34 #ifndef AIMS_UTILITY_MINMAX_H
35 #define AIMS_UTILITY_MINMAX_H
45 template <
typename ObjectType,
typename ValueType>
46 void minmax(
const ObjectType &, ValueType &min, ValueType &max );
49 template <
typename ObjectType,
typename ValueType>
50 void minmax(
const ObjectType &, ValueType &min, ValueType &max )
52 ObjectType::error_minmax_not_specialized;
59 template <
typename ValueType>
70 for (
int t = 0; t < dt; t++ )
72 for (
int z = 0; z < dz; z++ )
74 for (
int y = 0; y < dy; y++ )
76 it = &volume.
at( 0, y, z, t );
77 for (
int x = 0; x < dx; x++ )
79 if ( *it <
min )
min = *it;
80 if ( *it >
max )
max = *it;
92 template <
typename ValueType>
94 ValueType &min, ValueType &max )
103 template <
typename ValueType>
105 ValueType &min, ValueType &max )
const T & at(long x, long y=0, long z=0, long t=0) const
The class for EcatSino data write operation.
void minmax(const ObjectType &, ValueType &min, ValueType &max)
T min(const Volume< T > &vol)
T max(const Volume< T > &vol)