A.I.M.S algorithms


aims::ImageAlgorithm< T > Class Template Reference

aims::ImageAlgorithm class used to implement image algorithms More...

#include <aims/algorithm/imagealgorithm.h>

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

Public Types

typedef T VoxelType
 
typedef carto::DataTypeTraits
< T >::ChannelType 
ChannelType
 
- Public Types inherited from aims::ImageAlgorithmInterface< T >
typedef T VoxelType
 

Public Member Functions

virtual void execute (const carto::VolumeRef< T > &in, carto::VolumeRef< T > &out) const
 ImageAlgorithmInterface<T> Pure virtual method. More...
 
virtual Point4dl getOutputImageDimensions (const Point4dl &dims) const
 Returns the output dimensions of the processed image. More...
 
virtual Point4df getOutputImageVoxelSize (const Point4df &voxelsize) const
 Returns the output voxel size of the processed image. More...
 
virtual ImageAlgorithm< T > * clone () const
 ImageAlgorithmInterface<T> Pure virtual method. More...
 
virtual void setVerbose (int level)
 
virtual AimsData< T > doit (const AimsData< T > &in)
 Convenience method that execute the algorithm on the input image. More...
 
virtual ~ImageAlgorithm ()
 
- Public Member Functions inherited from aims::ImageAlgorithmInterface< T >
virtual void setOptions (const carto::Object &options)
 
virtual void updateOptions (const carto::Object &options)
 
virtual Point4dl getOutputImageDimensions (const long &dx=1, const long &dy=1, const long &dz=1, const long &dt=1) const
 
virtual Point4df getOutputImageVoxelSize (const float &vx=1.0, const float &vy=1.0, const float &vz=1.0, const float &vt=1.0) const
 
virtual carto::VolumeRef< T > execute (const carto::VolumeRef< T > &in) const
 
virtual AimsData< T > execute (const AimsData< T > &in) const
 
virtual void setQuiet ()
 
virtual ~ImageAlgorithmInterface ()
 

Protected Member Functions

 ImageAlgorithm ()
 
 ImageAlgorithm (const ImageAlgorithmInterface< ChannelType > &algo)
 
 ImageAlgorithm (ImageAlgorithmInterface< ChannelType > *algo, bool deepcopy=true)
 
 ImageAlgorithm (const ImageAlgorithm &other)
 
ImageAlgorithmoperator= (const ImageAlgorithm &other)
 
- Protected Member Functions inherited from aims::ImageAlgorithmInterface< T >
 ImageAlgorithmInterface ()
 
 ImageAlgorithmInterface (const ImageAlgorithmInterface &other)
 
ImageAlgorithmInterfaceoperator= (const ImageAlgorithmInterface &other)
 

Protected Attributes

carto::rc_ptr
< ImageAlgorithmInterface
< ChannelType > > 
_algo
 
- Protected Attributes inherited from aims::ImageAlgorithmInterface< T >
int _verbose
 

Detailed Description

template<typename T>
class aims::ImageAlgorithm< T >

aims::ImageAlgorithm class used to implement image algorithms

aims::ImageAlgorithm is a base class that allows to not take care about multi-channel management. When a multi-channel image is processed, the c ImageAlgorithmInterface will be applied to each channel separately.

Template Parameters
Ttype of voxel that will be processed by ImageAlgorithmInterface

Definition at line 57 of file imagealgorithm.h.

Member Typedef Documentation

template<typename T >
typedef carto::DataTypeTraits<T>::ChannelType aims::ImageAlgorithm< T >::ChannelType

Definition at line 214 of file imagealgorithm.h.

template<typename T >
typedef T aims::ImageAlgorithm< T >::VoxelType

Definition at line 213 of file imagealgorithm.h.

Constructor & Destructor Documentation

template<typename T >
virtual aims::ImageAlgorithm< T >::~ImageAlgorithm ( )
inlinevirtual

Definition at line 266 of file imagealgorithm.h.

template<typename T >
aims::ImageAlgorithm< T >::ImageAlgorithm ( )
inlineprotected

Definition at line 268 of file imagealgorithm.h.

template<typename T >
aims::ImageAlgorithm< T >::ImageAlgorithm ( const ImageAlgorithmInterface< ChannelType > &  algo)
inlineprotected

Definition at line 269 of file imagealgorithm.h.

template<typename T >
aims::ImageAlgorithm< T >::ImageAlgorithm ( ImageAlgorithmInterface< ChannelType > *  algo,
bool  deepcopy = true 
)
inlineprotected

Definition at line 273 of file imagealgorithm.h.

template<typename T >
aims::ImageAlgorithm< T >::ImageAlgorithm ( const ImageAlgorithm< T > &  other)
inlineprotected

Definition at line 277 of file imagealgorithm.h.

Member Function Documentation

template<typename T >
virtual AimsData< T > aims::ImageAlgorithm< T >::doit ( const AimsData< T > &  in)
inlinevirtual

Convenience method that execute the algorithm on the input image.

Please prefer the execute() method

Parameters
inInput image to process
Returns
Processed image

Definition at line 257 of file imagealgorithm.h.

References aims::ImageAlgorithmInterface< T >::execute().

template<typename T >
virtual void aims::ImageAlgorithm< T >::execute ( const carto::VolumeRef< T > &  in,
carto::VolumeRef< T > &  out 
) const
inlinevirtual

ImageAlgorithmInterface<T> Pure virtual method.

Returns the image processed by an algorithm on the input image into an already allocated output volume.

Parameters
inInput image to process
outOutput image processed

Implements aims::ImageAlgorithmInterface< T >.

Definition at line 219 of file imagealgorithm.h.

References aims::ImageAlgorithm< T >::_algo, and aims::ImageAlgorithmInterface< T >::_verbose.

Referenced by MajoritySmoothing< T >::doit(), MinSmoothing< T >::doit(), MaxSmoothing< T >::doit(), MeanSmoothing< T >::doit(), and MedianSmoothing< T >::doit().

template<typename T >
virtual Point4dl aims::ImageAlgorithm< T >::getOutputImageDimensions ( const Point4dl dims) const
inlinevirtual

Returns the output dimensions of the processed image.

This is used when output image does not have the same dimensions as input image.

Parameters
Point4dldims dimensions of the input image.
Returns
Point4dl dimensions of the output image.

The default implementation returns same dimensions as input.

Reimplemented from aims::ImageAlgorithmInterface< T >.

Definition at line 226 of file imagealgorithm.h.

References aims::ImageAlgorithm< T >::_algo.

template<typename T >
virtual Point4df aims::ImageAlgorithm< T >::getOutputImageVoxelSize ( const Point4df voxelsize) const
inlinevirtual

Returns the output voxel size of the processed image.

This is used when output image does not have the same voxel size as input image.

Parameters
Point4dfvoxelsize voxel size of the input image.
Returns
Point4df voxel size of the output image.

The default implementation returns same voxel size as input.

Reimplemented from aims::ImageAlgorithmInterface< T >.

Definition at line 230 of file imagealgorithm.h.

References aims::ImageAlgorithm< T >::_algo.

template<typename T >
ImageAlgorithm& aims::ImageAlgorithm< T >::operator= ( const ImageAlgorithm< T > &  other)
inlineprotected
template<typename T >
virtual void aims::ImageAlgorithm< T >::setVerbose ( int  level)
inlinevirtual

Member Data Documentation


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