ITK
6.0.0
Insight Toolkit
|
#include <itkImageFunction.h>
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.
Definition at line 55 of file itkImageFunction.h.
Public Member Functions | |
void | ConvertContinuousIndexToNearestIndex (const ContinuousIndexType &cindex, IndexType &index) const |
void | ConvertPointToContinuousIndex (const PointType &point, ContinuousIndexType &cindex) const |
OutputType | Evaluate (const PointType &point) const override=0 |
virtual TOutput | EvaluateAtContinuousIndex (const ContinuousIndexType &index) const =0 |
virtual TOutput | EvaluateAtIndex (const IndexType &index) const =0 |
virtual const ContinuousIndexType & | GetEndContinuousIndex () const |
virtual const IndexType & | GetEndIndex () const |
const InputImageType * | GetInputImage () const |
const char * | GetNameOfClass () const override |
virtual const ContinuousIndexType & | GetStartContinuousIndex () const |
virtual const IndexType & | GetStartIndex () 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 |
void | ConvertPointToNearestIndex (const PointType &point, IndexType &index) const |
Public Member Functions inherited from itk::FunctionBase< Point< TCoordinate, TInputImage::ImageDimension >, TOutput > | |
const char * | GetNameOfClass () const override |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) 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 |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () 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) const |
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 |
Protected Member Functions | |
ImageFunction () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~ImageFunction () override=default | |
Protected Member Functions inherited from itk::FunctionBase< Point< TCoordinate, TInputImage::ImageDimension >, TOutput > | |
FunctionBase ()=default | |
~FunctionBase () override=default | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
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 | |
std::atomic< int > | m_ReferenceCount {} |
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 () |
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::ConstPointer = SmartPointer<const Self> |
Definition at line 69 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::ContinuousIndexType = ContinuousIndex<TCoordinate, Self::ImageDimension> |
ContinuousIndex Type.
Definition at line 98 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::CoordinateType = TCoordinate |
CoordinateType type alias support
Definition at line 87 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::IndexType = typename InputImageType::IndexType |
Index Type.
Definition at line 94 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::IndexValueType = typename InputImageType::IndexValueType |
Definition at line 95 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::InputImageConstPointer = typename InputImageType::ConstPointer |
InputImagePointer type alias support
Definition at line 81 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::InputImageType = TInputImage |
InputImageType type alias support
Definition at line 75 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::InputPixelType = typename InputImageType::PixelType |
InputPixel type alias support
Definition at line 78 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::OutputType = TOutput |
OutputType type alias support
Definition at line 84 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::Pointer = SmartPointer<Self> |
Definition at line 68 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::PointType = Point<TCoordinate, Self::ImageDimension> |
Point Type.
Definition at line 101 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::Self = ImageFunction |
Standard class type aliases.
Definition at line 64 of file itkImageFunction.h.
using itk::ImageFunction< TInputImage, TOutput, TCoordinate >::Superclass = FunctionBase<Point<TCoordinate, Self::ImageDimension>, TOutput> |
Definition at line 66 of file itkImageFunction.h.
|
protected |
|
overrideprotecteddefault |
|
inline |
Convert continuous index to nearest index.
Definition at line 207 of file itkImageFunction.h.
|
inline |
Convert point to continuous index
Definition at line 200 of file itkImageFunction.h.
|
inline |
Convert point to nearest index.
Definition at line 191 of file itkImageFunction.h.
|
overridepure virtual |
Evaluate the function at specified Point position. Subclasses must provide this method.
Implements itk::FunctionBase< Point< TCoordinate, TInputImage::ImageDimension >, TOutput >.
Implemented in itk::CentralDifferenceImageFunction< TInputImage, TCoordinate, TOutputType >, itk::BSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >, itk::BSplineInterpolateImageFunction< TImageType, TCoordinate, TImageType::PixelType >, itk::RayCastInterpolateImageFunction< TInputImage, TCoordinate >, itk::DiscreteGradientMagnitudeGaussianImageFunction< TInputImage, TOutput >, itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >, itk::DiscreteGaussianDerivativeImageFunction< TInputImage, TOutput >, itk::MeanImageFunction< TInputImage, TCoordinate >, itk::MahalanobisDistanceThresholdImageFunction< TInputImage, TCoordinate >, itk::VectorInterpolateImageFunction< TInputImage, TCoordinate >, itk::SumOfSquaresImageFunction< TInputImage, TCoordinate >, itk::CovarianceImageFunction< TInputImage, TCoordinate >, itk::InterpolateImageFunction< TInputImage, TCoordinate >, itk::MedianImageFunction< TInputImage, TCoordinate >, itk::NeighborhoodBinaryThresholdImageFunction< TInputImage, TCoordinate >, itk::ScatterMatrixImageFunction< TInputImage, TCoordinate >, itk::InterpolateImageFunction< TImageType, TCoordinate >, itk::GaussianBlurImageFunction< TInputImage, TOutput >, itk::VectorMeanImageFunction< TInputImage, TCoordinate >, itk::VarianceImageFunction< TInputImage, TCoordinate >, itk::BinaryThresholdImageFunction< TInputImage, TCoordinate >, itk::ExtrapolateImageFunction< TInputImage, TCoordinate >, itk::BSplineControlPointImageFunction< TInputImage, TCoordinate >, and itk::NeighborhoodOperatorImageFunction< TInputImage, TOutput >.
|
pure virtual |
Evaluate the function at specified ContinuousIndex position. Subclasses must provide this method.
Implemented in itk::VectorInterpolateImageFunction< TInputImage, TCoordinate >, itk::InterpolateImageFunction< TInputImage, TCoordinate >, itk::InterpolateImageFunction< TImageType, TCoordinate >, itk::ExtrapolateImageFunction< TInputImage, TCoordinate >, itk::WindowedSincInterpolateImageFunction< TInputImage, VRadius, TWindowFunction, TBoundaryCondition, TCoordinate >, itk::BSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >, itk::BSplineInterpolateImageFunction< TImageType, TCoordinate, TImageType::PixelType >, itk::RayCastInterpolateImageFunction< TInputImage, TCoordinate >, itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction< TInputImage, TCoordinate >, itk::DiscreteGradientMagnitudeGaussianImageFunction< TInputImage, TOutput >, itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >, itk::DiscreteGaussianDerivativeImageFunction< TInputImage, TOutput >, itk::MahalanobisDistanceThresholdImageFunction< TInputImage, TCoordinate >, itk::ComplexBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >, itk::BinaryThresholdImageFunction< TInputImage, TCoordinate >, itk::LinearInterpolateImageFunction< TInputImage, TCoordinate >, itk::VectorLinearInterpolateImageFunction< TInputImage, TCoordinate >, itk::VectorNearestNeighborInterpolateImageFunction< TInputImage, TCoordinate >, itk::NearestNeighborExtrapolateImageFunction< TInputImage, TCoordinate >, itk::NearestNeighborInterpolateImageFunction< TInputImage, TCoordinate >, itk::CentralDifferenceImageFunction< TInputImage, TCoordinate, TOutputType >, itk::GaussianInterpolateImageFunction< TInputImage, TCoordinate >, itk::LabelImageGaussianInterpolateImageFunction< TInputImage, TCoordinate, TPixelCompare >, itk::MeanImageFunction< TInputImage, TCoordinate >, itk::SumOfSquaresImageFunction< TInputImage, TCoordinate >, itk::CovarianceImageFunction< TInputImage, TCoordinate >, itk::MedianImageFunction< TInputImage, TCoordinate >, itk::NeighborhoodBinaryThresholdImageFunction< TInputImage, TCoordinate >, itk::ScatterMatrixImageFunction< TInputImage, TCoordinate >, itk::GaussianBlurImageFunction< TInputImage, TOutput >, itk::VectorMeanImageFunction< TInputImage, TCoordinate >, itk::VarianceImageFunction< TInputImage, TCoordinate >, itk::BSplineControlPointImageFunction< TInputImage, TCoordinate >, and itk::NeighborhoodOperatorImageFunction< TInputImage, TOutput >.
|
pure virtual |
Evaluate the function at specified Index position. Subclasses must provide this method.
Implemented in itk::ExtrapolateImageFunction< TInputImage, TCoordinate >, itk::CentralDifferenceImageFunction< TInputImage, TCoordinate, TOutputType >, itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction< TInputImage, TCoordinate >, itk::VectorInterpolateImageFunction< TInputImage, TCoordinate >, itk::InterpolateImageFunction< TInputImage, TCoordinate >, itk::InterpolateImageFunction< TImageType, TCoordinate >, itk::BinaryThresholdImageFunction< TInputImage, TCoordinate >, itk::MahalanobisDistanceThresholdImageFunction< TInputImage, TCoordinate >, itk::DiscreteGradientMagnitudeGaussianImageFunction< TInputImage, TOutput >, itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >, itk::DiscreteGaussianDerivativeImageFunction< TInputImage, TOutput >, itk::GaussianDerivativeImageFunction< TInputImage, TOutput >, itk::NearestNeighborExtrapolateImageFunction< TInputImage, TCoordinate >, itk::NeighborhoodOperatorImageFunction< TInputImage, TOutput >, itk::GaussianBlurImageFunction< TInputImage, TOutput >, itk::MeanImageFunction< TInputImage, TCoordinate >, itk::SumOfSquaresImageFunction< TInputImage, TCoordinate >, itk::CovarianceImageFunction< TInputImage, TCoordinate >, itk::MedianImageFunction< TInputImage, TCoordinate >, itk::NeighborhoodBinaryThresholdImageFunction< TInputImage, TCoordinate >, itk::ScatterMatrixImageFunction< TInputImage, TCoordinate >, itk::VectorMeanImageFunction< TInputImage, TCoordinate >, itk::VarianceImageFunction< TInputImage, TCoordinate >, and itk::BSplineControlPointImageFunction< TInputImage, TCoordinate >.
|
virtual |
|
virtual |
|
inline |
Get the input image.
Definition at line 112 of file itkImageFunction.h.
|
overridevirtual |
Reimplemented from itk::Object.
Reimplemented in itk::InterpolateImageFunction< TImageType, TCoordinate >.
|
virtual |
|
virtual |
|
inlinevirtual |
Check if a continuous index is inside the image buffer.
Reimplemented in itk::RayCastInterpolateImageFunction< TInputImage, TCoordinate >, and itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction< TInputImage, TCoordinate >.
Definition at line 160 of file itkImageFunction.h.
|
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.
Reimplemented in itk::RayCastInterpolateImageFunction< TInputImage, TCoordinate >, and itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction< TInputImage, TCoordinate >.
Definition at line 139 of file itkImageFunction.h.
|
inlinevirtual |
Check if a point is inside the image buffer.
Reimplemented in itk::RayCastInterpolateImageFunction< TInputImage, TCoordinate >, and itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction< TInputImage, TCoordinate >.
Definition at line 178 of file itkImageFunction.h.
|
overrideprotectedvirtual |
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, TCoordinate >.
|
virtual |
Set the input image.
Reimplemented in itk::CentralDifferenceImageFunction< TInputImage, TCoordinate, TOutputType >, itk::GaussianInterpolateImageFunction< TInputImage, TCoordinate >, itk::BSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >, itk::BSplineInterpolateImageFunction< TImageType, TCoordinate, TImageType::PixelType >, itk::ComplexBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >, itk::BSplineResampleImageFunction< TImageType, TCoordinate >, itk::DiscreteGaussianDerivativeImageFunction< TInputImage, TOutput >, itk::DiscreteGradientMagnitudeGaussianImageFunction< TInputImage, TOutput >, itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >, itk::GaussianDerivativeImageFunction< TInputImage, TOutput >, itk::GaussianBlurImageFunction< TInputImage, TOutput >, itk::BSplineControlPointImageFunction< TInputImage, TCoordinate >, and itk::WindowedSincInterpolateImageFunction< TInputImage, VRadius, TWindowFunction, TBoundaryCondition, TCoordinate >.
|
staticconstexpr |
Dimension underlying input image.
Definition at line 61 of file itkImageFunction.h.
|
protected |
Definition at line 232 of file itkImageFunction.h.
|
protected |
Definition at line 229 of file itkImageFunction.h.
|
protected |
Const pointer to the input image.
Definition at line 225 of file itkImageFunction.h.
|
protected |
Definition at line 231 of file itkImageFunction.h.
|
protected |
Cache some values for testing if indices are inside buffered region.
Definition at line 228 of file itkImageFunction.h.