STIR  6.2.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 
23 START_NAMESPACE_STIR
24 
25 class Succeeded;
26 class NumericType;
27 template <class T>
28 class NumericInfo;
29 template <int num_dimensions, class elemT>
30 class Array;
31 
44 template <int num_dimensions, class IStreamT, class elemT>
45 inline Succeeded read_data(IStreamT& s, Array<num_dimensions, elemT>& data, const ByteOrder byte_order = ByteOrder::native);
46 
59 template <int num_dimensions, class IStreamT, class elemT, class InputType, class ScaleT>
60 inline Succeeded read_data(IStreamT& s,
61  Array<num_dimensions, elemT>& data,
62  NumericInfo<InputType> input_type,
63  ScaleT& scale_factor,
64  const ByteOrder byte_order = ByteOrder::native);
65 
76 template <int num_dimensions, class IStreamT, class elemT, class ScaleT>
77 inline Succeeded read_data(IStreamT& s,
78  Array<num_dimensions, elemT>& data,
79  NumericType type,
80  ScaleT& scale,
81  const ByteOrder byte_order = ByteOrder::native);
82 
83 END_NAMESPACE_STIR
84 
85 #include "stir/IO/read_data.inl"
86 
87 #endif
This file declares the stir::ByteOrder class.
Implementation of stir::read_data() functions for reading stir::Array&#39;s from file.
Succeeded read_data(IStreamT &s, Array< 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