34#ifndef AIMS_UTILITY_MINMAX_H
35#define AIMS_UTILITY_MINMAX_H
37#include <cartodata/volume/volume.h>
45template <
typename ObjectType,
typename ValueType>
46void minmax(
const ObjectType &, ValueType &min, ValueType &max );
49template <
typename ObjectType,
typename ValueType>
52 ObjectType::error_minmax_not_specialized;
59template <
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;
92template <
typename ValueType>
94 ValueType &
min, ValueType &
max )
103template <
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)