aimsalgo  5.1.2
Neuroimaging image processing
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 ~ImageAlgorithm ()
 
- Public Member Functions inherited from aims::ImageAlgorithmInterface< T >
virtual void setOptions (const carto::Object &)
 
virtual void updateOptions (const carto::Object &)
 
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 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 200 of file imagealgorithm.h.

Member Typedef Documentation

◆ ChannelType

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

Definition at line 207 of file imagealgorithm.h.

◆ VoxelType

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

Definition at line 206 of file imagealgorithm.h.

Constructor & Destructor Documentation

◆ ~ImageAlgorithm()

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

Definition at line 247 of file imagealgorithm.h.

◆ ImageAlgorithm() [1/4]

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

Definition at line 249 of file imagealgorithm.h.

◆ ImageAlgorithm() [2/4]

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

Definition at line 250 of file imagealgorithm.h.

◆ ImageAlgorithm() [3/4]

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

Definition at line 254 of file imagealgorithm.h.

References deepcopy().

◆ ImageAlgorithm() [4/4]

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

Definition at line 258 of file imagealgorithm.h.

Member Function Documentation

◆ clone()

◆ 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 212 of file imagealgorithm.h.

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

Referenced by MedianSmoothing< T >::doit().

◆ getOutputImageDimensions()

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 219 of file imagealgorithm.h.

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

◆ getOutputImageVoxelSize()

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 223 of file imagealgorithm.h.

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

◆ operator=()

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

◆ setVerbose()

template<typename T >
virtual void aims::ImageAlgorithm< T >::setVerbose ( int  level)
inlinevirtual

Member Data Documentation

◆ _algo


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