ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Attributes | 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 >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using ContinuousIndexType = ContinuousIndex< TCoordRep, Self::ImageDimension >
 
using CoordRepType = TCoordRep
 
using IndexType = typename InputImageType::IndexType
 
using IndexValueType = typename InputImageType::IndexValueType
 
using InputImageConstPointer = typename InputImageType::ConstPointer
 
using InputImageType = TInputImage
 
using InputPixelType = typename InputImageType::PixelType
 
using OutputType = TOutput
 
using Pointer = SmartPointer< Self >
 
using PointType = Point< TCoordRep, Self::ImageDimension >
 
using Self = ImageFunction
 
using Superclass = FunctionBase< Point< TCoordRep, Self::ImageDimension >, TOutput >
 
- Public Types inherited from itk::FunctionBase< Point< TCoordRep, TInputImage::ImageDimension >, TOutput >
using ConstPointer = SmartPointer< const Self >
 
using InputType = Point< TCoordRep, TInputImage::ImageDimension >
 
using OutputType = TOutput
 
using Pointer = SmartPointer< Self >
 
using Self = FunctionBase
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

TOutput Evaluate (const PointType &point) const override=0
 
virtual TOutput EvaluateAtContinuousIndex (const ContinuousIndexType &index) const =0
 
virtual TOutput EvaluateAtIndex (const IndexType &index) const =0
 
const InputImageTypeGetInputImage () const
 
virtual const char * GetNameOfClass () const
 
virtual void SetInputImage (const InputImageType *ptr)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () 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
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Attributes

static constexpr unsigned int ImageDimension = TInputImage::ImageDimension
 
InputImageConstPointer m_Image
 
IndexType m_StartIndex
 
IndexType m_EndIndex
 
ContinuousIndexType m_StartContinuousIndex
 
ContinuousIndexType m_EndContinuousIndex
 
virtual bool IsInsideBuffer (const IndexType &index) const
 
virtual bool IsInsideBuffer (const ContinuousIndexType &index) const
 
virtual bool IsInsideBuffer (const PointType &point) const
 
void ConvertPointToNearestIndex (const PointType &point, IndexType &index) const
 
void ConvertPointToContinuousIndex (const PointType &point, ContinuousIndexType &cindex) const
 
void ConvertContinuousIndexToNearestIndex (const ContinuousIndexType &cindex, IndexType &index) const
 
virtual const IndexTypeGetStartIndex () const
 
virtual const IndexTypeGetEndIndex () const
 
virtual const ContinuousIndexTypeGetStartContinuousIndex () const
 
virtual const ContinuousIndexTypeGetEndContinuousIndex () const
 
 ImageFunction ()
 
 ~ImageFunction () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 

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 val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Member Functions inherited from itk::FunctionBase< Point< TCoordRep, TInputImage::ImageDimension >, TOutput >
 FunctionBase ()=default
 
 ~FunctionBase () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- 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 inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

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 55 of file itkImageFunction.h.

Member Typedef Documentation

◆ ConstPointer

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

Definition at line 69 of file itkImageFunction.h.

◆ ContinuousIndexType

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
using itk::ImageFunction< TInputImage, TOutput, TCoordRep >::ContinuousIndexType = ContinuousIndex<TCoordRep, Self::ImageDimension>

ContinuousIndex Type.

Definition at line 94 of file itkImageFunction.h.

◆ CoordRepType

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

CoordRepType type alias support

Definition at line 87 of file itkImageFunction.h.

◆ IndexType

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

Index Type.

Definition at line 90 of file itkImageFunction.h.

◆ IndexValueType

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

Definition at line 91 of file itkImageFunction.h.

◆ InputImageConstPointer

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

InputImagePointer type alias support

Definition at line 81 of file itkImageFunction.h.

◆ InputImageType

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

InputImageType type alias support

Definition at line 75 of file itkImageFunction.h.

◆ InputPixelType

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

InputPixel type alias support

Definition at line 78 of file itkImageFunction.h.

◆ OutputType

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

OutputType type alias support

Definition at line 84 of file itkImageFunction.h.

◆ Pointer

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

Definition at line 68 of file itkImageFunction.h.

◆ PointType

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
using itk::ImageFunction< TInputImage, TOutput, TCoordRep >::PointType = Point<TCoordRep, Self::ImageDimension>

Point Type.

Definition at line 97 of file itkImageFunction.h.

◆ Self

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

Standard class type aliases.

Definition at line 64 of file itkImageFunction.h.

◆ Superclass

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
using itk::ImageFunction< TInputImage, TOutput, TCoordRep >::Superclass = FunctionBase<Point<TCoordRep, Self::ImageDimension>, TOutput>

Definition at line 66 of file itkImageFunction.h.

Constructor & Destructor Documentation

◆ ImageFunction()

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

Const pointer to the input image.

◆ ~ImageFunction()

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

Const pointer to the input image.

Member Function Documentation

◆ ConvertContinuousIndexToNearestIndex()

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 205 of file itkImageFunction.h.

◆ ConvertPointToContinuousIndex()

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 198 of file itkImageFunction.h.

◆ ConvertPointToNearestIndex()

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 188 of file itkImageFunction.h.

◆ Evaluate()

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

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

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

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

◆ EvaluateAtContinuousIndex()

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 >.

◆ EvaluateAtIndex()

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual TOutput itk::ImageFunction< TInputImage, TOutput, TCoordRep >::EvaluateAtIndex ( const IndexType index) const
pure virtual

◆ GetEndContinuousIndex()

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual const ContinuousIndexType& itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetEndContinuousIndex ( ) const
virtual

Const pointer to the input image.

◆ GetEndIndex()

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual const IndexType& itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetEndIndex ( ) const
virtual

Const pointer to the input image.

◆ GetInputImage()

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
const InputImageType* itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetInputImage ( ) const
inline

Get the input image.

Definition at line 108 of file itkImageFunction.h.

◆ GetNameOfClass()

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::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >, itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TImageType::PixelType >, itk::CentralDifferenceImageFunction< TInputImage, TCoordRep, TOutputType >, itk::LabelImageGaussianInterpolateImageFunction< TInputImage, TCoordRep, TPixelCompare >, itk::RayCastInterpolateImageFunction< TInputImage, TCoordRep >, itk::BSplineControlPointImageFunction< TInputImage, TCoordRep >, itk::BSplineResampleImageFunction< TImageType, TCoordRep >, itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction< TInputImage, TCoordRep >, itk::VectorInterpolateImageFunction< TInputImage, TCoordRep >, itk::GaussianDerivativeImageFunction< TInputImage, TOutput >, itk::GaussianInterpolateImageFunction< TInputImage, TCoordRep >, itk::DiscreteGradientMagnitudeGaussianImageFunction< TInputImage, TOutput >, itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >, itk::NeighborhoodOperatorImageFunction< TInputImage, TOutput >, itk::DiscreteGaussianDerivativeImageFunction< TInputImage, TOutput >, itk::CovarianceImageFunction< TInputImage, TCoordRep >, itk::MeanImageFunction< TInputImage, TCoordRep >, itk::ScatterMatrixImageFunction< TInputImage, TCoordRep >, itk::MedianImageFunction< TInputImage, TCoordRep >, itk::ComplexBSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >, itk::LinearInterpolateImageFunction< TInputImage, TCoordRep >, itk::MahalanobisDistanceThresholdImageFunction< TInputImage, TCoordRep >, itk::SumOfSquaresImageFunction< TInputImage, TCoordRep >, itk::GaussianBlurImageFunction< TInputImage, TOutput >, itk::InterpolateImageFunction< TInputImage, TCoordRep >, itk::VectorMeanImageFunction< TInputImage, TCoordRep >, itk::InterpolateImageFunction< TImageType, TCoordRep >, itk::VectorLinearInterpolateImageFunction< TInputImage, TCoordRep >, itk::ExtrapolateImageFunction< TInputImage, TCoordRep >, itk::VarianceImageFunction< TInputImage, TCoordRep >, itk::VectorNearestNeighborInterpolateImageFunction< TInputImage, TCoordRep >, itk::BinaryThresholdImageFunction< TInputImage, TCoordRep >, itk::NeighborhoodBinaryThresholdImageFunction< TInputImage, TCoordRep >, itk::NearestNeighborExtrapolateImageFunction< TInputImage, TCoordRep >, and itk::NearestNeighborInterpolateImageFunction< TInputImage, TCoordRep >.

◆ GetStartContinuousIndex()

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual const ContinuousIndexType& itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetStartContinuousIndex ( ) const
virtual

Const pointer to the input image.

◆ GetStartIndex()

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
virtual const IndexType& itk::ImageFunction< TInputImage, TOutput, TCoordRep >::GetStartIndex ( ) const
virtual

Const pointer to the input image.

◆ IsInsideBuffer() [1/3]

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 156 of file itkImageFunction.h.

◆ IsInsideBuffer() [2/3]

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.

◆ IsInsideBuffer() [3/3]

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.

Definition at line 174 of file itkImageFunction.h.

◆ PrintSelf()

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

Const pointer to the input image.

Reimplemented from itk::Object.

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

Referenced by itk::ExtrapolateImageFunction< TInputImage, TCoordRep >::PrintSelf().

◆ SetInputImage()

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

Member Data Documentation

◆ ImageDimension

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

Dimension underlying input image.

Definition at line 61 of file itkImageFunction.h.

◆ m_EndContinuousIndex

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
ContinuousIndexType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::m_EndContinuousIndex
protected

Const pointer to the input image.

Definition at line 230 of file itkImageFunction.h.

◆ m_EndIndex

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
IndexType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::m_EndIndex
protected

Const pointer to the input image.

Definition at line 227 of file itkImageFunction.h.

◆ m_Image

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
InputImageConstPointer itk::ImageFunction< TInputImage, TOutput, TCoordRep >::m_Image
protected

Const pointer to the input image.

Definition at line 223 of file itkImageFunction.h.

◆ m_StartContinuousIndex

template<typename TInputImage, typename TOutput, typename TCoordRep = float>
ContinuousIndexType itk::ImageFunction< TInputImage, TOutput, TCoordRep >::m_StartContinuousIndex
protected

Const pointer to the input image.

Definition at line 229 of file itkImageFunction.h.

◆ m_StartIndex

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 226 of file itkImageFunction.h.


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