STIR 6.4.0
write_data.h
Go to the documentation of this file.
1#ifndef __stir_IO_write_data_H__
2#define __stir_IO_write_data_H__
3/*
4 Copyright (C) 2004- 2007, Hammersmith Imanet Ltd
5 This file is part of STIR.
6
7 SPDX-License-Identifier: Apache-2.0
8
9 See STIR/LICENSE.txt for details
10*/
19
20#include "stir/ByteOrder.h"
21#include "stir/ArrayFwd.h"
22
23START_NAMESPACE_STIR
24
25class Succeeded;
26class NumericType;
27template <class T>
28class NumericInfo;
29
51template <int num_dimensions, class OStreamT, class elemT>
52inline Succeeded write_data(OStreamT& s,
53 const ArrayType<num_dimensions, elemT>& data,
54 const ByteOrder byte_order = ByteOrder::native,
55 const bool can_corrupt_data = false);
72template <int num_dimensions, class OStreamT, class elemT, class OutputType, class ScaleT>
73inline Succeeded write_data(OStreamT& s,
74 const ArrayType<num_dimensions, elemT>& data,
75 NumericInfo<OutputType> output_type,
76 ScaleT& scale_factor,
77 const ByteOrder byte_order = ByteOrder::native,
78 const bool can_corrupt_data = false);
79
97template <int num_dimensions, class OStreamT, class elemT, class OutputType, class ScaleT>
98inline Succeeded write_data_with_fixed_scale_factor(OStreamT& s,
99 const ArrayType<num_dimensions, elemT>& data,
100 NumericInfo<OutputType> output_type,
101 const ScaleT scale_factor,
102 const ByteOrder byte_order = ByteOrder::native,
103 const bool can_corrupt_data = false);
104
120
121template <int num_dimensions, class OStreamT, class elemT, class ScaleT>
122inline Succeeded write_data(OStreamT& s,
123 const ArrayType<num_dimensions, elemT>& data,
124 NumericType type,
125 ScaleT& scale,
126 const ByteOrder byte_order = ByteOrder::native,
127 const bool can_corrupt_data = false);
128
129END_NAMESPACE_STIR
130
131#include "stir/IO/write_data.inl"
132
133#endif
forward declaration of stir::Array class for multi-dimensional (numeric) arrays
This file declares the stir::ByteOrder class.
Succeeded 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.
Definition write_data.inl:82
Succeeded 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.
Definition write_data.inl:108
Implementation of stir::write_data() functions for writing stir::Array's to file.