aimsalgo  5.1.2
Neuroimaging image processing
aims::MajorityLabelResampler< T > Class Template Reference

Volume resampler using linear (order 1) interpolation, then selects the majority label in the neighbouring values. More...

#include <aims/resampling/majoritylabelresampler.h>

Inheritance diagram for aims::MajorityLabelResampler< T >:
Collaboration diagram for aims::MajorityLabelResampler< T >:

Public Member Functions

 MajorityLabelResampler ()
 
 ~MajorityLabelResampler ()
 
int getOrder () const CARTO_OVERRIDE
 Spline order (1 to 7) More...
 
- Public Member Functions inherited from aims::SplineResampler< T >
 SplineResampler ()
 
 ~SplineResampler ()
 
carto::VolumeRef< double > getSplineCoef (const carto::Volume< T > &inVolume, int t=0, bool verbose=false)
 Computes spline coefficients corresponding to an input volume. More...
 
void reset ()
 Clear the cache. More...
 
void resample_inv_to_vox (const carto::Volume< T > &input_data, const soma::Transformation3d &inverse_transform_to_vox, const T &background, carto::Volume< T > &output_data, bool verbose=false) const CARTO_OVERRIDE
 Resample a volume into an existing output volume. More...
 
void resample_channel_inv_to_vox (const carto::Volume< ChannelType > &inVolume, const soma::Transformation3d &inverse_transform_to_vox, const ChannelType &outBackground, carto::Volume< ChannelType > &outVolume, bool verbose) const
 
- Public Member Functions inherited from aims::Resampler< T >
 Resampler ()
 
virtual ~Resampler ()
 
void setVerboseStream (std::ostream &stream)
 write verbose progress information to this stream. More...
 
void doit (const aims::AffineTransformation3d &transform, carto::Volume< T > &output_data) const
 Resample the input volume set with setRef() into an existing volume. More...
 
carto::VolumeRef< T > doit (const aims::AffineTransformation3d &transform, int dimX, int dimY, int dimZ, const Point3df &voxel_size) const
 Resample the input volume set with setRef() in a newly allocated volume. More...
 
virtual void resample (const carto::Volume< T > &input_data, const aims::AffineTransformation3d &transform, const T &background, carto::Volume< T > &output_data, bool verbose=false) const
 Resample a volume into an existing output volume. More...
 
void resample (const carto::Volume< T > &input_data, const aims::AffineTransformation3d &transform, const T &background, const Point3df &output_location, T &output_value, int timestep) const
 Resample a volume at a single location. More...
 
void resample_inv (const carto::Volume< T > &input_data, const soma::Transformation3d &inverse_transform_to_mm, const T &background, const Point3df &output_location, T &output_value, int timestep) const
 Resample a volume at a single location. More...
 
void resample_inv (const carto::Volume< T > &input_data, const soma::Transformation3d &inverse_transform_to_mm, const T &background, carto::Volume< T > &output_data, bool verbose=false) const
 Resample a volume into an existing output volume. More...
 
void resample_inv_to_vox (const carto::Volume< T > &input_data, const soma::Transformation3d &inverse_transform_to_vox, const T &background, const Point3df &output_location, T &output_value, int timestep) const
 Resample a volume at a single location. More...
 
void setRef (const carto::rc_ptr< carto::Volume< T > > &ref)
 Set the input data to be resampled by the doit() methods. More...
 
const carto::rc_ptr< carto::Volume< T > > & ref () const
 Input data to be resampled by the doit() methods. More...
 
void setDefaultValue (T val)
 Set the background value to be used by the doit() methods. More...
 
const T & defaultValue () const
 Background value used by the doit() methods. More...
 
- Public Member Functions inherited from carto::RCObject
 RCObject ()
 
 RCObject (const RCObject &)
 
RCObjectoperator= (const RCObject &)
 
virtual ~RCObject ()
 

Protected Types

typedef SplineResampler< T >::ChannelType ChannelType
 

Protected Member Functions

void doResampleChannel (const carto::Volume< ChannelType > &inVolume, const soma::Transformation3d &transform3d, const ChannelType &outBackground, const Point3df &outLocation, ChannelType &outValue, int t) const CARTO_OVERRIDE
 
double getBSplineWeight (int i, double x) const CARTO_OVERRIDE
 Returns $ B^n( x - i )$. More...
 
- Protected Member Functions inherited from aims::SplineResampler< T >
void doResample (const carto::Volume< T > &inVolume, const soma::Transformation3d &transform3d, const T &outBackground, const Point3df &outLocation, T &outValue, int t) const CARTO_OVERRIDE
 Resample a volume at a single location. More...
 
void updateParameters (const carto::Volume< T > &inVolume, int t, bool verbose) const CARTO_OVERRIDE
 Update the cache of spline coefficients if needed. More...
 
virtual void updateParametersChannel (const carto::Volume< ChannelType > &inVolume, int t, bool verbose) const
 
void iirConvolveMirror (std::vector< double > &data) const
 
int getFold (int i, int size) const
 This method returns a mirror index when needed. More...
 

Additional Inherited Members

- Public Types inherited from aims::SplineResampler< T >
typedef carto::DataTypeTraits< T >::ChannelType ChannelType
 
- Public Types inherited from carto::RCObject
typedef int RefCounterType
 
- Protected Attributes inherited from aims::SplineResampler< T >
std::vector< double > _poles
 
double _gain
 
carto::VolumeRef< double > _splineCoefficients
 
const carto::Volume< ChannelType > * _lastvolume
 
int _lasttime
 
- Protected Attributes inherited from aims::Resampler< T >
carto::rc_ptr< carto::Volume< T > > _ref
 
_defval
 
std::ostream * _verbose_stream
 

Detailed Description

template<class T>
class aims::MajorityLabelResampler< T >

Volume resampler using linear (order 1) interpolation, then selects the majority label in the neighbouring values.

The resampling API is described in the base classes, Resampler and SplineResampler.

Definition at line 50 of file majoritylabelresampler.h.

Member Typedef Documentation

◆ ChannelType

template<class T >
typedef SplineResampler<T>::ChannelType aims::MajorityLabelResampler< T >::ChannelType
protected

Definition at line 60 of file majoritylabelresampler.h.

Constructor & Destructor Documentation

◆ MajorityLabelResampler()

Definition at line 48 of file majoritylabelresampler_d.h.

◆ ~MajorityLabelResampler()

Definition at line 55 of file majoritylabelresampler_d.h.

Member Function Documentation

◆ doResampleChannel()

template<class T >
void aims::MajorityLabelResampler< T >::doResampleChannel ( const carto::Volume< ChannelType > &  inVolume,
const soma::Transformation3d transform3d,
const ChannelType outBackground,
const Point3df outLocation,
ChannelType outValue,
int  t 
) const
protectedvirtual

◆ getBSplineWeight()

template<class T >
double aims::MajorityLabelResampler< T >::getBSplineWeight ( int  i,
double  x 
) const
protectedvirtual

Returns $ B^n( x - i )$.

This method is defined by each nth order derived class

Implements aims::SplineResampler< T >.

Definition at line 229 of file majoritylabelresampler_d.h.

◆ getOrder()

template<class T >
int aims::MajorityLabelResampler< T >::getOrder ( ) const
virtual

Spline order (1 to 7)

Implements aims::SplineResampler< T >.

Definition at line 61 of file majoritylabelresampler_d.h.


The documentation for this class was generated from the following files: