35 #ifndef AIMS_MOMENT_GEOMMOMENT_H
36 #define AIMS_MOMENT_GEOMMOMENT_H
58 #pragma GCC diagnostic push
59 #pragma GCC diagnostic ignored "-Woverloaded-virtual"
63 #pragma GCC diagnostic pop
72 template<
class T >
inline
76 setMomentType( type );
80 template<
class T >
inline
86 stgy = factory.
create( type );
90 template<
class T >
inline
98 template<
class T >
inline
104 this->_cx = (double)d->getVoxelSize()[0];
105 this->_cy = (double)d->getVoxelSize()[1];
106 this->_cz = (double)d->getVoxelSize()[2];
107 this->_ct = this->_cx * this->_cy * this->_cz;
112 for ( i=0; i<3; i++ ) this->_m1[ i ] = 0.0;
113 for ( i=0; i<6; i++ ) this->_m2[ i ] = 0.0;
114 for ( i=0; i<10; i++ ) this->_m3[ i ] = 0.0;
121 template <
typename T>
inline
127 this->_cx = (double)b.
sizeX();
128 this->_cy = (double)b.
sizeY();
129 this->_cz = (double)b.
sizeZ();
130 this->_ct = this->_cx * this->_cy * this->_cz;
135 for ( i=0; i<3; i++ ) this->_m1[ i ] = 0.0;
136 for ( i=0; i<6; i++ ) this->_m2[ i ] = 0.0;
137 for ( i=0; i<10; i++ ) this->_m3[ i ] = 0.0;
virtual void doit(carto::rc_ptr< carto::Volume< T > > &, T, int d=(int) Moment< T >::mAdd)
void setMomentType(MomentType)
GeometricMoment(MomentType mType=Incremental)
void update(double, double, double, int dir=(int) Moment< T >::mAdd)
MomentStrategy< T > * create(MomentBase::MomentType)
virtual void orientation()