|
STIR 6.4.0
|

Topics | |
| Implementation details for functions that implement IO for Array objects | |
Files | |
| file | read_data.h |
| declarations of stir::read_data() functions for reading Arrays from file | |
| file | read_data.inl |
| Implementation of stir::read_data() functions for reading stir::Array's from file. | |
| file | write_data.h |
| declarations of stir::write_data() functions for writing Arrays to file | |
| file | write_data.inl |
| Implementation of stir::write_data() functions for writing stir::Array's to file. | |
Functions | |
| template<int num_dimensions, class IStreamT, class elemT> | |
| Succeeded | stir::read_data (IStreamT &s, ArrayType< num_dimensions, elemT > &data, const ByteOrder byte_order=ByteOrder::native) |
| Read the data of an Array from file. | |
| template<int num_dimensions, class IStreamT, class elemT, class InputType, class ScaleT> | |
| Succeeded | stir::read_data (IStreamT &s, ArrayType< num_dimensions, elemT > &data, NumericInfo< InputType > input_type, ScaleT &scale_factor, const ByteOrder byte_order=ByteOrder::native) |
| Read the data of an Array from file as a different type. | |
| template<int num_dimensions, class IStreamT, class elemT, class ScaleT> | |
| Succeeded | stir::read_data (IStreamT &s, ArrayType< num_dimensions, elemT > &data, NumericType type, ScaleT &scale, const ByteOrder byte_order=ByteOrder::native) |
| Read the data of an Array from file as a different type. | |
| template<int num_dimensions, class OStreamT, class elemT> | |
| Succeeded | stir::write_data (OStreamT &s, const ArrayType< num_dimensions, elemT > &data, const ByteOrder byte_order=ByteOrder::native, const bool can_corrupt_data=false) |
| Write the data of an Array to file. | |
| template<int num_dimensions, class OStreamT, class elemT, class OutputType, class ScaleT> | |
| Succeeded | stir::write_data (OStreamT &s, const ArrayType< num_dimensions, elemT > &data, NumericInfo< OutputType > output_type, ScaleT &scale_factor, const ByteOrder byte_order=ByteOrder::native, const bool can_corrupt_data=false) |
| Write the data of an Array to file as a different type. | |
| template<int num_dimensions, class OStreamT, class elemT, class OutputType, class ScaleT> | |
| Succeeded | stir::write_data_with_fixed_scale_factor (OStreamT &s, const ArrayType< num_dimensions, elemT > &data, NumericInfo< OutputType > output_type, const ScaleT scale_factor, const ByteOrder byte_order=ByteOrder::native, const bool can_corrupt_data=false) |
| Write the data of an Array to file as a different type but using a given scale factor. | |
| template<int num_dimensions, class OStreamT, class elemT, class ScaleT> | |
| Succeeded | stir::write_data (OStreamT &s, const ArrayType< num_dimensions, elemT > &data, NumericType type, ScaleT &scale, const ByteOrder byte_order=ByteOrder::native, const bool can_corrupt_data=false) |
| Write the data of an Array to file as a different type. | |
|
inline |
Read the data of an Array from file.
Only the data will be written, not the dimensions, start indices, nor byte-order. Hence, this should only used for low-level IO.
IStreamT is supposed to be stream or file type (see implementations for read_data_1d()).
References read_data().
Referenced by stir::ProjDataFromStream::get_bin_value(), stir::ProjDataFromStream::get_segment_by_sinogram(), stir::ProjDataFromStream::get_segment_by_view(), stir::ProjDataFromStream::get_sinogram(), stir::ProjDataFromStream::get_viewgram(), read_data(), read_data(), read_data(), read_interfile_dynamic_image(), read_interfile_image(), read_interfile_parametric_image(), and stir::GE::RDF_HDF5::InputStreamWithRecordsFromHDF5< stir::GE::RDF_HDF5::CListRecordGEHDF5 >::set_saved_get_positions().
|
inline |
Read the data of an Array from file as a different type.
This function essentially first calls convert_data() to construct an array with elements of type InputType, and then calls read_data(IStreamT&, const ArrayType<num_dimensions,elemT>&, const ByteOrder, const bool).
References convert_array(), and read_data().
|
inline |
Read the data of an Array from file as a different type.
References read_data(), and warning().
|
inline |
Write the data of an Array to file.
Only the data will be written, not the dimensions, start indices, nor byte-order. Hence, this should only used for low-level IO.
OStreamT is supposed to be stream or file type (see implementations for detail::write_data_1d()).
If can_corrupt_data = true, the data in the array can be byte-swapped after writing, and hence should no longer be used. This is useful for saving (a little bit of) time.
num_dimensions, but explicitly defined for a few dimensions (see the source). References write_data(), and write_data_with_fixed_scale_factor().
Referenced by stir::ProjDataFromStream::set_bin_value(), stir::ProjDataFromStream::set_segment(), stir::ProjDataFromStream::set_segment(), stir::ProjDataFromStream::set_sinogram(), stir::ColsherFilter::set_up(), stir::ProjDataFromStream::set_viewgram(), write_data(), write_data(), and write_data().
|
inline |
Write the data of an Array to file as a different type.
This function essentially first calls convert_data() to construct an array with elements of type OutputType, and then calls write_data(OstreamT&, const ArrayType<num_dimensions,elemT>&, const ByteOrder, const bool).
num_dimensions, but explicitly defined for a few dimensions (see the source). References find_scale_factor(), write_data(), and write_data_with_fixed_scale_factor().
|
inline |
Write the data of an Array to file as a different type but using a given scale factor.
If scale_factor is such that the data/scale_factor does not fit in the range for OutputType, the writing will fail. However, data might have been partially written to file anyway.
num_dimensions, but explicitly defined for a few dimensions (see the source). References write_data_with_fixed_scale_factor().
Referenced by write_data(), write_data(), and write_data_with_fixed_scale_factor().
|
inline |
Write the data of an Array to file as a different type.
num_dimensions, but explicitly defined for a few dimensions (see the source). References warning(), and write_data().