STIR 6.4.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*/
20
21#include "stir/ByteOrder.h"
22#include "stir/ArrayFwd.h"
23
24START_NAMESPACE_STIR
25
26class Succeeded;
27class NumericType;
28template <class T>
29class NumericInfo;
30
43template <int num_dimensions, class IStreamT, class elemT>
44inline Succeeded read_data(IStreamT& s, ArrayType<num_dimensions, elemT>& data, const ByteOrder byte_order = ByteOrder::native);
45
58template <int num_dimensions, class IStreamT, class elemT, class InputType, class ScaleT>
59inline 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
75template <int num_dimensions, class IStreamT, class elemT, class ScaleT>
76inline 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
82END_NAMESPACE_STIR
83
84#include "stir/IO/read_data.inl"
85
86#endif
forward declaration of stir::Array class for multi-dimensional (numeric) arrays
This file declares the stir::ByteOrder class.
Succeeded read_data(IStreamT &s, ArrayType< num_dimensions, elemT > &data, const ByteOrder byte_order=ByteOrder::native)
Read the data of an Array from file.
Definition read_data.inl:63
Implementation of stir::read_data() functions for reading stir::Array's from file.