36 #ifndef AIMS_SIGNALFILTER_GGRADIENT_H
37 #define AIMS_SIGNALFILTER_GGRADIENT_H
64 template<
class T >
inline
66 : sigx( sx ), sigy( sy ), sigz( sz )
68 ASSERT( sigx >= 0.1f && sigx <= 100.0f );
69 ASSERT( sigy >= 0.1f && sigy <= 100.0f );
70 ASSERT( sigz >= 0.1f && sigz <= 100.0f );
79 float sx = sigx / vs[0];
80 float sy = sigy / vs[1];
81 float sz = sigz / vs[2];
90 for (
int i=0; i<3; i++ )
117 for (z=0; z< data->getSizeZ(); z++)
118 for (y=0; y< data->getSizeY(); y++)
119 for(x=0; x< data->getSizeX(); x++)
121 grad(x,y,z)=sqrt ( (res[0](x,y,z)*res[0](x,y,z))
122 + (res[1](x,y,z)*res[1](x,y,z))
123 + (res[2](x,y,z)*res[2](x,y,z)) );
133 std::vector<float> vs = data->getVoxelSize();
134 float sx = sigx / vs[0];
135 float sy = sigy / vs[1];
136 float sz = sigz / vs[2];
145 for (
int i=0; i<3; i++ )
void doit(carto::rc_ptr< carto::Volume< float > > &)
carto::VolumeRef< float > doit(const carto::rc_ptr< carto::Volume< T > > &)
virtual ~GaussianGradient()
AimsVector< carto::VolumeRef< float >, 3 > doitGradientVector(const carto::rc_ptr< carto::Volume< T > > &data)
GaussianGradient(float sx=1.0f, float sy=1.0f, float sz=1.0f)
void doit(carto::rc_ptr< carto::Volume< float > > &)
void doit(carto::rc_ptr< carto::Volume< float > > &)
virtual void convert(const INP &in, OUTP &out) const
std::vector< float > getVoxelSize() const
VolumeRef< T > copy() const