STIR  6.2.0
convert_range.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2006- 2012, 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 */
11 #ifndef __stir_convert_range_H__
12 #define __stir_convert_range_H__
13 
25 #include "stir/common.h"
26 
27 START_NAMESPACE_STIR
28 
29 template <class T>
30 class NumericInfo;
31 
39 template <class InputIteratorT, class T2, class scaleT>
40 inline void find_scale_factor(scaleT& scale_factor,
41  const InputIteratorT& begin,
42  const InputIteratorT& end,
43  const NumericInfo<T2> info_for_out_type);
44 
60 template <class OutputIteratorT, class InputIteratorT, class scaleT>
61 inline void convert_range(const OutputIteratorT& out_begin,
62  scaleT& scale_factor,
63  const InputIteratorT& in_begin,
64  const InputIteratorT& in_end);
65 
66 END_NAMESPACE_STIR
67 
68 #include "stir/convert_range.inl"
69 
70 #endif
implementation of stir::convert_range
void find_scale_factor(scaleT &scale_factor, const InputIteratorT &begin, const InputIteratorT &end, 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_range.inl:92
void convert_range(const OutputIteratorT &out_begin, scaleT &scale_factor, const InputIteratorT &in_begin, const InputIteratorT &in_end)
Converts the data in the input range to the output range (with elements of different types) such that...
Definition: convert_range.inl:129
basic configuration include file