primatologist-gpl  5.1.2
volume.h
Go to the documentation of this file.
1 /* Copyright (C) 2000-2013 CEA
2  *
3  * This software and supporting documentation were developed by
4  * bioPICSEL
5  * CEA/DSV/I²BM/MIRCen/LMN, Batiment 61,
6  * 18, route du Panorama
7  * 92265 Fontenay-aux-Roses
8  * France
9  */
10 
11 #ifndef PRIMATOLOGIST_UTILITY_VOLUME_H
12 #define PRIMATOLOGIST_UTILITY_VOLUME_H
13 
14 
15 //----------------------------------------------------------------------------
16 // volume util
17 //----------------------------------------------------------------------------
18 
20 #include <aims/vector/vector.h>
21 #include <cartodata/volume/volume.h>
22 #include <cartobase/type/datatypetraits.h>
23 
24 namespace aims {
25 namespace vol {
26 
27  template <typename T>
28  carto::VolumeRef<T> empty();
29 
30  template <typename T>
31  carto::VolumeRef<T> select( const carto::VolumeRef<T> & in, int t );
32 
33  template <typename P, typename T>
34  bool inside( const P & p, const carto::VolumeRef<T> & input );
35 
36  template <typename P, typename T>
37  bool insideAllocated( const P & p, const carto::VolumeRef<T> & input );
38 
39  template <typename T>
40  bool inside( const Point4di & p, const carto::VolumeRef<T> & input );
41 
42  template <typename T>
43  bool insideAllocated( const Point4di & p, const carto::VolumeRef<T> & input );
44 
45  template <typename T, typename M>
46  carto::VolumeRef<T> &
47  clip( carto::VolumeRef<T> & in,
48  const typename type::identity<T>::type & min,
49  const typename type::identity<T>::type & max,
50  const carto::VolumeRef<M> & mask );
51 
52  template <typename T>
53  carto::VolumeRef<T> &
54  clip( carto::VolumeRef<T> & in,
55  const typename type::identity<T>::type & min,
56  const typename type::identity<T>::type & max );
57 
58  template <typename T, typename M>
59  carto::VolumeRef<T>
60  newClip( carto::VolumeRef<T> & in,
61  const typename type::identity<T>::type & min,
62  const typename type::identity<T>::type & max,
63  const carto::VolumeRef<M> & mask );
64 
65  template <typename T>
66  carto::VolumeRef<T>
67  newClip( carto::VolumeRef<T> & in,
68  const typename type::identity<T>::type & min,
69  const typename type::identity<T>::type & max );
70 
71  template <typename T1, typename T2, typename M>
72  uintmax_t
73  sumLogicalDiff( const carto::VolumeRef<T1> & one,
74  const carto::VolumeRef<T2> & two,
75  const carto::VolumeRef<M> & mask );
76 
77  template <typename T1, typename T2>
78  uintmax_t
79  sumLogicalDiff( const carto::VolumeRef<T1> & one,
80  const carto::VolumeRef<T2> & two );
81 
82  template <typename T, typename M>
83  typename carto::DataTypeTraits<T>::LongType
84  sum( const carto::VolumeRef<T> & in,
85  const carto::VolumeRef<M> & mask );
86 
87 } // namespace vol
88 } // namespace aims
89 
90 #endif // PRIMATOLOGIST_UTILITY_VOLUME_H
float min(float x, float y)
float max(float x, float y)
carto::DataTypeTraits< T >::LongType sum(const carto::VolumeRef< T > &in, const carto::VolumeRef< M > &mask)
Definition: volume_d.h:163
uintmax_t sumLogicalDiff(const carto::VolumeRef< T1 > &one, const carto::VolumeRef< T2 > &two, const carto::VolumeRef< M > &mask)
Definition: volume_d.h:131
bool insideAllocated(const P &p, const carto::VolumeRef< T > &input)
Definition: volume_d.h:47
carto::VolumeRef< T > empty()
Definition: volume_d.h:22
carto::VolumeRef< T > select(const carto::VolumeRef< T > &in, int t)
Definition: volume_d.h:29
carto::VolumeRef< T > newClip(carto::VolumeRef< T > &in, const typename type::identity< T >::type &min, const typename type::identity< T >::type &max, const carto::VolumeRef< M > &mask)
Definition: volume_d.h:108
bool inside(const P &p, const carto::VolumeRef< T > &input)
Definition: volume_d.h:37
carto::VolumeRef< T > & clip(carto::VolumeRef< T > &in, const typename type::identity< T >::type &min, const typename type::identity< T >::type &max, const carto::VolumeRef< M > &mask)
Definition: volume_d.h:78