ITK  4.6.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
itk::ImageFunction< TInputImage, TOutput, TCoordRep > Class Template Referenceabstract

#include <itkImageFunction.h>

+ Inheritance diagram for itk::ImageFunction< TInputImage, TOutput, TCoordRep >:
+ Collaboration diagram for itk::ImageFunction< TInputImage, TOutput, TCoordRep >:

Detailed Description

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
class itk::ImageFunction< TInputImage, TOutput, TCoordRep >

Evaluates a function of an image at specified position.

ImageFunction is a baseclass for all objects that evaluates a function of an image at index, continuous index or point. This class is templated over the input image type, the type of the function output and the coordinate representation type (e.g. float or double).

The input image is set via method SetInputImage(). Methods Evaluate, EvaluateAtIndex and EvaluateAtContinuousIndex respectively evaluates the function at an geometric point, image index and continuous image index.

Warning
Image BufferedRegion information is cached during in SetInputImage( image ). If the image BufferedRegion has changed one must call SetInputImage( image ) again to update the cache to the current values.
See Also
Point
Index
ContinuousIndex

Definition at line 58 of file itkImageFunction.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef ContinuousIndex
< TCoordRep,
itkGetStaticConstMacro(ImageDimension) > 
ContinuousIndexType
 
typedef TCoordRep CoordRepType
 
typedef InputImageType::IndexType IndexType
 
typedef
InputImageType::IndexValueType 
IndexValueType
 
typedef
InputImageType::ConstPointer 
InputImageConstPointer
 
typedef TInputImage InputImageType
 
typedef InputImageType::PixelType InputPixelType
 
typedef TOutput OutputType
 
typedef SmartPointer< SelfPointer
 
typedef Point< TCoordRep,
itkGetStaticConstMacro(ImageDimension) > 
PointType
 
typedef ImageFunction Self
 
typedef FunctionBase< Point
< TCoordRep,
itkGetStaticConstMacro(ImageDimension) >
, TOutput > 
Superclass
 
- Public Types inherited from itk::FunctionBase< Point< TCoordRep, TInputImage::ImageDimension >, TOutput >
typedef SmartPointer< const SelfConstPointer
 
typedef Point< TCoordRep,
TInputImage::ImageDimension > 
InputType
 
typedef TOutput OutputType
 
typedef SmartPointer< SelfPointer
 
typedef FunctionBase Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

void ConvertContinuousIndexToNearestIndex (const ContinuousIndexType &cindex, IndexType &index) const
 
void ConvertPointToContinuousIndex (const PointType &point, ContinuousIndexType &cindex) const
 
void ConvertPointToNearestIndex (const PointType &point, IndexType &index) const
 
virtual TOutput Evaluate (const PointType &point) const =0
 
virtual TOutput EvaluateAtContinuousIndex (const ContinuousIndexType &index) const =0
 
virtual TOutput EvaluateAtIndex (const IndexType &index) const =0
 
virtual const ContinuousIndexTypeGetEndContinuousIndex () const
 
virtual const IndexTypeGetEndIndex () const
 
const InputImageTypeGetInputImage () const
 
virtual const char * GetNameOfClass () const
 
virtual const ContinuousIndexTypeGetStartContinuousIndex () const
 
virtual const IndexTypeGetStartIndex () const
 
virtual void SetInputImage (const InputImageType *ptr)
 
virtual bool IsInsideBuffer (const IndexType &index) const
 
virtual bool IsInsideBuffer (const ContinuousIndexType &index) const
 
virtual bool IsInsideBuffer (const PointType &point) const
 
- Public Member Functions inherited from itk::FunctionBase< Point< TCoordRep, TInputImage::ImageDimension >, TOutput >
virtual OutputType Evaluate (const InputType &input) const =0
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual LightObject::Pointer CreateAnother () const ITK_OVERRIDE
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
const MetaDataDictionaryGetMetaDataDictionary (void) const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const ITK_OVERRIDE
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) ITK_OVERRIDE
 
virtual void UnRegister () const ITK_OVERRIDE
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Attributes

static const unsigned int ImageDimension = TInputImage::ImageDimension
 

Protected Member Functions

 ImageFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
 ~ImageFunction ()
 
- Protected Member Functions inherited from itk::FunctionBase< Point< TCoordRep, TInputImage::ImageDimension >, TOutput >
 FunctionBase ()
 
 ~FunctionBase ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

ContinuousIndexType m_EndContinuousIndex
 
IndexType m_EndIndex
 
InputImageConstPointer m_Image
 
ContinuousIndexType m_StartContinuousIndex
 
IndexType m_StartIndex
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

Private Member Functions

 ImageFunction (const Self &)
 
void operator= (const Self &)
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 

Member Typedef Documentation

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef SmartPointer< const Self > itk::ImageFunction< TInputImage, TOutput, TCoordRep >::ConstPointer

Definition at line 75 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef ContinuousIndex< TCoordRep, itkGetStaticConstMacro(ImageDimension) > itk::ImageFunction< TInputImage, TOutput, TCoordRep >::ContinuousIndexType

ContinuousIndex Type.

Definition at line 101 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef TCoordRep itk::ImageFunction< TInputImage, TOutput, TCoordRep >::CoordRepType

CoordRepType typedef support.

Definition at line 93 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef InputImageType::IndexType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::IndexType

Index Type.

Definition at line 96 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef InputImageType::IndexValueType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::IndexValueType

Definition at line 97 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef InputImageType::ConstPointer itk::ImageFunction< TInputImage, TOutput, TCoordRep >::InputImageConstPointer

InputImagePointer typedef support

Definition at line 87 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef TInputImage itk::ImageFunction< TInputImage, TOutput, TCoordRep >::InputImageType

InputImageType typedef support.

Definition at line 78 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef InputImageType::PixelType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::InputPixelType

InputPixel typedef support

Definition at line 84 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef TOutput itk::ImageFunction< TInputImage, TOutput, TCoordRep >::OutputType

OutputType typedef support.

Definition at line 90 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef SmartPointer< Self > itk::ImageFunction< TInputImage, TOutput, TCoordRep >::Pointer

Definition at line 74 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef Point< TCoordRep, itkGetStaticConstMacro(ImageDimension) > itk::ImageFunction< TInputImage, TOutput, TCoordRep >::PointType

Point Type.

Definition at line 104 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef ImageFunction itk::ImageFunction< TInputImage, TOutput, TCoordRep >::Self

Standard class typedefs.

Definition at line 67 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
typedef FunctionBase< Point< TCoordRep, itkGetStaticConstMacro(ImageDimension) >, TOutput > itk::ImageFunction< TInputImage, TOutput, TCoordRep >::Superclass

Definition at line 72 of file itkImageFunction.h.

Constructor & Destructor Documentation

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
itk::ImageFunction< TInputImage, TOutput, TCoordRep >::ImageFunction ( )
protected
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
itk::ImageFunction< TInputImage, TOutput, TCoordRep >::~ImageFunction ( )
inlineprotected

Definition at line 218 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
itk::ImageFunction< TInputImage, TOutput, TCoordRep >::ImageFunction ( const Self )
private

Member Function Documentation

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
void itk::ImageFunction< TInputImage, TOutput, TCoordRep >::ConvertContinuousIndexToNearestIndex ( const ContinuousIndexType cindex,
IndexType index 
) const
inline

Convert continuous index to nearest index.

Definition at line 203 of file itkImageFunction.h.

Referenced by itk::ImageFunction< TInputImage, TOutput, TOutput >::ConvertPointToNearestIndex().

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
void itk::ImageFunction< TInputImage, TOutput, TCoordRep >::ConvertPointToContinuousIndex ( const PointType point,
ContinuousIndexType cindex 
) const
inline

Convert point to continuous index

Definition at line 196 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
void itk::ImageFunction< TInputImage, TOutput, TCoordRep >::ConvertPointToNearestIndex ( const PointType point,
IndexType index 
) const
inline

Convert point to nearest index.

Definition at line 186 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual TOutput itk::ImageFunction< TInputImage, TOutput, TCoordRep >::Evaluate ( const PointType point) const
pure virtual
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual TOutput itk::ImageFunction< TInputImage, TOutput, TCoordRep >::EvaluateAtContinuousIndex ( const ContinuousIndexType index) const
pure virtual

Evaluate the function at specified ContinuousIndex position. Subclasses must provide this method.

Implemented in itk::InterpolateImageFunction< TImageType, TCoordRep >.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual TOutput itk::ImageFunction< TInputImage, TOutput, TCoordRep >::EvaluateAtIndex ( const IndexType index) const
pure virtual
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual const ContinuousIndexType& itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetEndContinuousIndex ( ) const
virtual
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual const IndexType& itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetEndIndex ( ) const
virtual
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
const InputImageType* itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetInputImage ( void  ) const
inline

Get the input image.

Definition at line 113 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual const char* itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::FunctionBase< Point< TCoordRep, TInputImage::ImageDimension >, TOutput >.

Reimplemented in itk::WindowedSincInterpolateImageFunction< TInputImage, VRadius, TWindowFunction, TBoundaryCondition, TCoordRep >, itk::CentralDifferenceImageFunction< TInputImage, TCoordRep, TOutputType >, itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >, itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TImageType::PixelType >, itk::RayCastInterpolateImageFunction< TInputImage, TCoordRep >, itk::VectorCentralDifferenceImageFunction< TInputImage, TCoordRep >, itk::LabelImageGaussianInterpolateImageFunction< TInputImage, TCoordRep, TPixelCompare >, itk::BSplineResampleImageFunction< TImageType, TCoordRep >, itk::VectorInterpolateImageFunction< TInputImage, TCoordRep >, itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction< TInputImage, TCoordRep >, itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >, itk::NeighborhoodOperatorImageFunction< TInputImage, TOutput >, itk::DiscreteGaussianDerivativeImageFunction< TInputImage, TOutput >, itk::DiscreteGradientMagnitudeGaussianImageFunction< TInputImage, TOutput >, itk::CovarianceImageFunction< TInputImage, TCoordRep >, itk::ScatterMatrixImageFunction< TInputImage, TCoordRep >, itk::GaussianBlurImageFunction< TInputImage, TOutput >, itk::GaussianInterpolateImageFunction< TInputImage, TCoordRep >, itk::MeanImageFunction< TInputImage, TCoordRep >, itk::MedianImageFunction< TInputImage, TCoordRep >, itk::VectorMeanImageFunction< TInputImage, TCoordRep >, itk::ComplexBSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >, itk::GaussianDerivativeImageFunction< TInputImage, TOutput >, itk::LinearInterpolateImageFunction< TInputImage, TCoordRep >, itk::MahalanobisDistanceThresholdImageFunction< TInputImage, TCoordRep >, itk::InterpolateImageFunction< TInputImage, TCoordRep >, itk::SumOfSquaresImageFunction< TInputImage, TCoordRep >, itk::VectorLinearInterpolateImageFunction< TInputImage, TCoordRep >, itk::VectorNearestNeighborInterpolateImageFunction< TInputImage, TCoordRep >, itk::InterpolateImageFunction< TImageType, TCoordRep >, itk::VarianceImageFunction< TInputImage, TCoordRep >, itk::ExtrapolateImageFunction< TInputImage, TCoordRep >, itk::BinaryThresholdImageFunction< TInputImage, TCoordRep >, itk::NeighborhoodBinaryThresholdImageFunction< TInputImage, TCoordRep >, itk::NearestNeighborExtrapolateImageFunction< TInputImage, TCoordRep >, and itk::NearestNeighborInterpolateImageFunction< TInputImage, TCoordRep >.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual const ContinuousIndexType& itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetStartContinuousIndex ( ) const
virtual
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual const IndexType& itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetStartIndex ( ) const
virtual
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual bool itk::ImageFunction< TInputImage, TOutput, TCoordRep >::IsInsideBuffer ( const IndexType index) const
inlinevirtual

Check if an index is inside the image buffer. We take into account the fact that each voxel has its center at the integer coordinate and extends half way to the next integer coordinate.

Warning
For efficiency, no validity checking of the input image is done.

Definition at line 135 of file itkImageFunction.h.

Referenced by itk::ImageFunction< TInputImage, TOutput, TOutput >::IsInsideBuffer().

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual bool itk::ImageFunction< TInputImage, TOutput, TCoordRep >::IsInsideBuffer ( const ContinuousIndexType index) const
inlinevirtual

Check if a continuous index is inside the image buffer.

Warning
For efficiency, no validity checking of the input image is done.

Definition at line 155 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual bool itk::ImageFunction< TInputImage, TOutput, TCoordRep >::IsInsideBuffer ( const PointType point) const
inlinevirtual

Check if a point is inside the image buffer.

Warning
For efficiency, no validity checking of the input image pointer is done.

Reimplemented in itk::RayCastInterpolateImageFunction< TInputImage, TCoordRep >.

Definition at line 173 of file itkImageFunction.h.

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
void itk::ImageFunction< TInputImage, TOutput, TCoordRep >::operator= ( const Self )
private
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
void itk::ImageFunction< TInputImage, TOutput, TCoordRep >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Object.

Reimplemented in itk::InterpolateImageFunction< TImageType, TCoordRep >.

Referenced by itk::ExtrapolateImageFunction< TInputImage, TCoordRep >::PrintSelf(), itk::InterpolateImageFunction< TImageType, TCoordRep >::PrintSelf(), and itk::VectorInterpolateImageFunction< TInputImage, TCoordRep >::PrintSelf().

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual void itk::ImageFunction< TInputImage, TOutput, TCoordRep >::SetInputImage ( const InputImageType ptr)
virtual

Member Data Documentation

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
const unsigned int itk::ImageFunction< TInputImage, TOutput, TCoordRep >::ImageDimension = TInputImage::ImageDimension
static

Dimension underlying input image.

Definition at line 64 of file itkImageFunction.h.

Referenced by itk::ImageFunction< TInputImage, TOutput, TOutput >::IsInsideBuffer().

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
ContinuousIndexType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::m_EndContinuousIndex
protected
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
IndexType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::m_EndIndex
protected
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
InputImageConstPointer itk::ImageFunction< TInputImage, TOutput, TCoordRep >::m_Image
protected
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
ContinuousIndexType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::m_StartContinuousIndex
protected
template<typename TInputImage, typename TOutput, typename TCoordRep = float>
IndexType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::m_StartIndex
protected

Cache some values for testing if indices are inside buffered region.

Definition at line 225 of file itkImageFunction.h.

Referenced by itk::ImageFunction< TInputImage, TOutput, TOutput >::IsInsideBuffer().


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