STIR  6.3.0
read_data.h
Go to the documentation of this file.
1 #ifndef __stir_IO_read_data_H__
2 #define __stir_IO_read_data_H__
3 /*
4  Copyright (C) 2004- 2007, Hammersmith Imanet Ltd
5  Copyright (C) 2024, University College London
6  This file is part of STIR.
7 
8  SPDX-License-Identifier: Apache-2.0
9 
10  See STIR/LICENSE.txt for details
11 */
21 #include "stir/ByteOrder.h"
22 #include "stir/ArrayFwd.h"
23 
24 START_NAMESPACE_STIR
25 
26 class Succeeded;
27 class NumericType;
28 template <class T>
29 class NumericInfo;
30 
43 template <int num_dimensions, class IStreamT, class elemT>
44 inline Succeeded read_data(IStreamT& s, ArrayType<num_dimensions, elemT>& data, const ByteOrder byte_order = ByteOrder::native);
45 
58 template <int num_dimensions, class IStreamT, class elemT, class InputType, class ScaleT>
59 inline Succeeded read_data(IStreamT& s,
60  ArrayType<num_dimensions, elemT>& data,
61  NumericInfo<InputType> input_type,
62  ScaleT& scale_factor,
63  const ByteOrder byte_order = ByteOrder::native);
64 
75 template <int num_dimensions, class IStreamT, class elemT, class ScaleT>
76 inline Succeeded read_data(IStreamT& s,
77  ArrayType<num_dimensions, elemT>& data,
78  NumericType type,
79  ScaleT& scale,
80  const ByteOrder byte_order = ByteOrder::native);
81 
82 END_NAMESPACE_STIR
83 
84 #include "stir/IO/read_data.inl"
85 
86 #endif
This file declares the stir::ByteOrder class.
forward declaration of stir::Array class for multi-dimensional (numeric) arrays
Implementation of stir::read_data() functions for reading stir::Array&#39;s from file.
Succeeded 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.
Definition: read_data.inl:96