STIR  6.2.0
convert_array.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000 PARAPET partners
5  Copyright (C) 2000- 2007, Hammersmith Imanet Ltd
6  This file is part of STIR.
7 
8  SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
9 
10  See STIR/LICENSE.txt for details
11 */
12 #ifndef __stir_convert_array_H__
13 #define __stir_convert_array_H__
14 
28 #include "stir/common.h"
29 
30 START_NAMESPACE_STIR
31 
32 template <class T>
34 template <int num_dimensions, class elemT>
35 class Array;
36 
66 template <int num_dimensions, class T1, class T2, class scaleT>
67 inline void
68 find_scale_factor(scaleT& scale_factor, const Array<num_dimensions, T1>& data_in, const NumericInfo<T2> info_for_out_type);
69 
102 template <int num_dimensions, class T1, class T2, class scaleT>
104 convert_array(scaleT& scale_factor, const Array<num_dimensions, T1>& data_in, const NumericInfo<T2> info2);
118 template <int num_dimensions, class T1, class T2, class scaleT>
119 inline void convert_array(Array<num_dimensions, T2>& data_out, scaleT& scale_factor, const Array<num_dimensions, T1>& data_in);
120 
121 END_NAMESPACE_STIR
122 
123 #include "stir/convert_array.inl"
124 
125 #endif
class NumericInfo<NUMBER> defines properties for the type NUMBER.
Definition: convert_array.h:33
void convert_array(Array< num_dimensions, T2 > &data_out, scaleT &scale_factor, const Array< num_dimensions, T1 > &data_in)
Converts the data_in Array to data_out (with elements of different types) such that data_in == data_o...
Definition: convert_array.inl:45
implementation of stir::convert_array
basic configuration include file
This class defines multi-dimensional (numeric) arrays.
Definition: Array.h:73
void find_scale_factor(scaleT &scale_factor, const Array< num_dimensions, T1 > &data_in, const NumericInfo< T2 > info_for_out_type)
A function that finds a scale factor to use when converting data to a new type.
Definition: convert_array.inl:28