ITK  5.2.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::ImageAdaptor< TImage, TAccessor > Class Template Reference

#include <itkImageAdaptor.h>

+ Inheritance diagram for itk::ImageAdaptor< TImage, TAccessor >:
+ Collaboration diagram for itk::ImageAdaptor< TImage, TAccessor >:

Classes

struct  Rebind
 

Public Types

using AccessorFunctorType = typename InternalImageType::AccessorFunctorType::template Rebind< Self >::Type
 
using AccessorType = TAccessor
 
using ConstPointer = SmartPointer< const Self >
 
using ConstWeakPointer = WeakPointer< const Self >
 
using DirectionType = typename Superclass::DirectionType
 
using IndexType = typename Superclass::IndexType
 
using IndexValueType = typename IndexType::IndexValueType
 
using InternalImageType = TImage
 
using InternalPixelPointerType = InternalPixelType *
 
using InternalPixelType = typename TAccessor::InternalType
 
using IOPixelType = PixelType
 
using OffsetType = typename Superclass::OffsetType
 
using OffsetValueType = typename OffsetType::OffsetValueType
 
using PixelContainer = typename TImage::PixelContainer
 
using PixelContainerConstPointer = typename TImage::PixelContainerConstPointer
 
using PixelContainerPointer = typename TImage::PixelContainerPointer
 
using PixelType = typename TAccessor::ExternalType
 
using Pointer = SmartPointer< Self >
 
using PointType = typename Superclass::PointType
 
template<typename UPixelType , unsigned int NUImageDimension = TImage::ImageDimension>
using RebindImageType = itk::Image< UPixelType, NUImageDimension >
 
using RegionType = typename Superclass::RegionType
 
using Self = ImageAdaptor
 
using SizeType = typename Superclass::SizeType
 
using SizeValueType = typename SizeType::SizeValueType
 
using SpacingType = typename Superclass::SpacingType
 
using Superclass = ImageBase< Self::ImageDimension >
 
- Public Types inherited from itk::ImageBase< TImage::ImageDimension >
using ConstPointer = SmartPointer< const Self >
 
using DirectionType = Matrix< SpacePrecisionType, VImageDimension, VImageDimension >
 
using ImageDimensionType = unsigned int
 
using IndexType = Index< VImageDimension >
 
using IndexValueType = typename IndexType::IndexValueType
 
using OffsetType = Offset< VImageDimension >
 
using OffsetValueType = typename OffsetType::OffsetValueType
 
using Pointer = SmartPointer< Self >
 
using PointType = Point< PointValueType, VImageDimension >
 
using PointValueType = SpacePrecisionType
 
using RegionType = ImageRegion< VImageDimension >
 
using Self = ImageBase
 
using SizeType = Size< VImageDimension >
 
using SizeValueType = typename SizeType::SizeValueType
 
using SpacingType = Vector< SpacingValueType, VImageDimension >
 
using SpacingValueType = SpacePrecisionType
 
using Superclass = DataObject
 
- Public Types inherited from itk::DataObject
using ConstPointer = SmartPointer< const Self >
 
using DataObjectIdentifierType = std::string
 
using DataObjectPointerArraySizeType = std::vector< Pointer >::size_type
 
using Pointer = SmartPointer< Self >
 
using Self = DataObject
 
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

void Allocate (bool initialize=false) override
 
IndexType ComputeIndex (OffsetValueType offset) const
 
void CopyInformation (const DataObject *data) override
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
const RegionTypeGetBufferedRegion () const override
 
InternalPixelTypeGetBufferPointer ()
 
const InternalPixelTypeGetBufferPointer () const
 
const DirectionTypeGetDirection () const override
 
const RegionTypeGetLargestPossibleRegion () const override
 
ModifiedTimeType GetMTime () const override
 
virtual const char * GetNameOfClass () const
 
const OffsetValueTypeGetOffsetTable () const
 
const PointTypeGetOrigin () const override
 
PixelType GetPixel (const IndexType &index) const
 
AccessorTypeGetPixelAccessor ()
 
const AccessorTypeGetPixelAccessor () const
 
PixelContainerPointer GetPixelContainer ()
 
const PixelContainerGetPixelContainer () const
 
const RegionTypeGetRequestedRegion () const override
 
const SpacingTypeGetSpacing () const override
 
virtual void Graft (const Self *imgData)
 
void Initialize () override
 
void Modified () const override
 
PixelType operator[] (const IndexType &index) const
 
void PropagateRequestedRegion () override
 
void SetBufferedRegion (const RegionType &region) override
 
void SetDirection (const DirectionType &direction) override
 
virtual void SetImage (TImage *)
 
void SetLargestPossibleRegion (const RegionType &region) override
 
void SetOrigin (const double *origin) override
 
void SetOrigin (const float *origin) override
 
void SetOrigin (const PointType origin) override
 
void SetPixel (const IndexType &index, const PixelType &value)
 
void SetPixelAccessor (const AccessorType &accessor)
 
void SetPixelContainer (PixelContainer *container)
 
void SetRequestedRegion (const DataObject *data) override
 
void SetRequestedRegion (const RegionType &region) override
 
void SetRequestedRegionToLargestPossibleRegion () override
 
void SetSpacing (const double *spacing) override
 
void SetSpacing (const float *spacing) override
 
void SetSpacing (const SpacingType &spacing) override
 
template<typename TCoordRep >
void TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TCoordRep, Self::ImageDimension > &index, Point< TCoordRep, Self::ImageDimension > &point) const
 
template<typename TCoordRep >
void TransformIndexToPhysicalPoint (const IndexType &index, Point< TCoordRep, Self::ImageDimension > &point) const
 
template<typename TCoordRep >
void TransformLocalVectorToPhysicalVector (const FixedArray< TCoordRep, Self::ImageDimension > &inputGradient, FixedArray< TCoordRep, Self::ImageDimension > &outputGradient) const
 
template<typename TVector >
TVector TransformLocalVectorToPhysicalVector (const TVector &inputGradient) const
 
template<typename TCoordRep >
bool TransformPhysicalPointToContinuousIndex (const Point< TCoordRep, Self::ImageDimension > &point, ContinuousIndex< TCoordRep, Self::ImageDimension > &index) const
 
template<typename TCoordRep >
bool TransformPhysicalPointToIndex (const Point< TCoordRep, Self::ImageDimension > &point, IndexType &index) const
 
template<typename TCoordRep >
void TransformPhysicalVectorToLocalVector (const FixedArray< TCoordRep, Self::ImageDimension > &inputGradient, FixedArray< TCoordRep, Self::ImageDimension > &outputGradient) const
 
template<typename TVector >
TVector TransformPhysicalVectorToLocalVector (const TVector &inputGradient) const
 
void Update () override
 
void UpdateOutputData () override
 
void UpdateOutputInformation () override
 
bool VerifyRequestedRegion () override
 
- Public Member Functions inherited from itk::ImageBase< TImage::ImageDimension >
virtual ::itk::LightObject::Pointer CreateAnother () const
 
void Initialize () override
 
virtual void SetOrigin (PointType _arg)
 
virtual void SetOrigin (const double origin[VImageDimension])
 
virtual void SetOrigin (const float origin[VImageDimension])
 
virtual void SetDirection (const DirectionType &direction)
 
virtual const DirectionTypeGetInverseDirection () const
 
virtual void SetLargestPossibleRegion (const RegionType &region)
 
virtual void SetBufferedRegion (const RegionType &region)
 
virtual void SetRequestedRegion (const RegionType &region)
 
void SetRequestedRegion (const DataObject *data) override
 
virtual void SetRegions (const RegionType &region)
 
virtual void SetRegions (const SizeType &size)
 
const OffsetValueTypeGetOffsetTable () const
 
OffsetValueType ComputeOffset (const IndexType &ind) const
 
IndexType ComputeIndex (OffsetValueType offset) const
 
virtual void SetSpacing (const SpacingType &spacing)
 
virtual void SetSpacing (const double spacing[VImageDimension])
 
virtual void SetSpacing (const float spacing[VImageDimension])
 
IndexType TransformPhysicalPointToIndex (const Point< TCoordRep, VImageDimension > &point) const
 
bool TransformPhysicalPointToIndex (const Point< TCoordRep, VImageDimension > &point, IndexType &index) const
 
ContinuousIndex< TIndexRep, VImageDimension > TransformPhysicalPointToContinuousIndex (const Point< TCoordRep, VImageDimension > &point) const
 
bool TransformPhysicalPointToContinuousIndex (const Point< TCoordRep, VImageDimension > &point, ContinuousIndex< TIndexRep, VImageDimension > &index) const
 
void TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index, Point< TCoordRep, VImageDimension > &point) const
 
Point< TCoordRep, VImageDimension > TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index) const
 
void TransformIndexToPhysicalPoint (const IndexType &index, Point< TCoordRep, VImageDimension > &point) const
 
Point< TCoordRep, VImageDimension > TransformIndexToPhysicalPoint (const IndexType &index) const
 
void TransformLocalVectorToPhysicalVector (const FixedArray< TCoordRep, VImageDimension > &inputGradient, FixedArray< TCoordRep, VImageDimension > &outputGradient) const
 
TVector TransformLocalVectorToPhysicalVector (const TVector &inputGradient) const
 
void TransformPhysicalVectorToLocalVector (const FixedArray< TCoordRep, VImageDimension > &inputGradient, FixedArray< TCoordRep, VImageDimension > &outputGradient) const
 
TVector TransformPhysicalVectorToLocalVector (const TVector &inputGradient) const
 
void CopyInformation (const DataObject *data) override
 
void UpdateOutputInformation () override
 
void UpdateOutputData () override
 
void SetRequestedRegionToLargestPossibleRegion () override
 
bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 
bool VerifyRequestedRegion () override
 
virtual unsigned int GetNumberOfComponentsPerPixel () const
 
virtual void SetNumberOfComponentsPerPixel (unsigned int)
 
- Public Member Functions inherited from itk::DataObject
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointer< ProcessObjectGetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
void SetReleaseDataFlag (bool flag)
 
bool ShouldIReleaseData () const
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStampGetRealTimeStamp () const
 
virtual void PrepareForNewData ()
 
virtual void DataHasBeenGenerated ()
 
- 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
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) 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 Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::ImageBase< TImage::ImageDimension >
static unsigned int GetImageDimension ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
 
static void GlobalReleaseDataFlagOff ()
 
static void GlobalReleaseDataFlagOn ()
 
static Pointer New ()
 
static void SetGlobalReleaseDataFlag (bool val)
 
- 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 ()
 

Static Public Attributes

static constexpr unsigned int ImageDimension = TImage::ImageDimension
 
- Static Public Attributes inherited from itk::ImageBase< TImage::ImageDimension >
static constexpr ImageDimensionType ImageDimension
 

Protected Member Functions

void Graft (const DataObject *data) override
 
 ImageAdaptor ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~ImageAdaptor () override=default
 
- Protected Member Functions inherited from itk::ImageBase< TImage::ImageDimension >
void Graft (const DataObject *data) override
 
 ImageBase ()
 
 ~ImageBase () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void ComputeOffsetTable ()
 
virtual void ComputeIndexToPhysicalPointMatrices ()
 
virtual void InitializeBufferedRegion ()
 
OffsetValueType FastComputeOffset (const IndexType &ind) const
 
IndexType FastComputeIndex (OffsetValueType offset) const
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
 ~DataObject () override
 
virtual void PropagateResetPipeline ()
 
- 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 ()
 

Private Member Functions

template<typename T >
void UpdateAccessor (T *)
 
template<typename TPixelType >
void UpdateAccessor (typename ::itk::VectorImage< TPixelType, ImageDimension > *)
 

Private Attributes

TImage::Pointer m_Image
 
AccessorType m_PixelAccessor
 

Additional Inherited Members

- Protected Attributes inherited from itk::ImageBase< TImage::ImageDimension >
SpacingType m_Spacing
 
PointType m_Origin
 
DirectionType m_Direction
 
DirectionType m_InverseDirection
 
DirectionType m_IndexToPhysicalPoint
 
DirectionType m_PhysicalPointToIndex
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TImage, typename TAccessor>
class itk::ImageAdaptor< TImage, TAccessor >

Give access to partial aspects of voxels from an Image.

ImageAdaptors are templated over the ImageType and over a functor that will specify what part of the pixel can be accessed

The basic aspects of this class are the types it defines.

Image adaptors can be used as intermediate classes that allow the sending of an image to a filter, specifying what part of the image pixels the filter will act on.

The TAccessor class should implement the Get and Set methods These two will specify how data can be put and get from parts of each pixel. It should define the types ExternalType and InternalType too.

ITK Sphinx Examples:
Examples
Examples/DataRepresentation/Image/ImageAdaptor1.cxx, Examples/DataRepresentation/Image/ImageAdaptor2.cxx, Examples/DataRepresentation/Image/ImageAdaptor3.cxx, Examples/DataRepresentation/Image/ImageAdaptor4.cxx, SphinxExamples/src/Core/ImageAdaptors/AddConstantToPixelsWithoutDuplicatingImage/Code.cxx, and SphinxExamples/src/Core/ImageAdaptors/PresentImageAfterOperation/Code.cxx.

Definition at line 56 of file itkImageAdaptor.h.

Member Typedef Documentation

◆ AccessorFunctorType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::AccessorFunctorType = typename InternalImageType::AccessorFunctorType::template Rebind<Self>::Type

type alias of the functor that chooses the appropriate accessor Image or VectorImage.

Definition at line 99 of file itkImageAdaptor.h.

◆ AccessorType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::AccessorType = TAccessor

Accessor type that convert data between internal and external representations.

Definition at line 95 of file itkImageAdaptor.h.

◆ ConstPointer

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::ConstPointer = SmartPointer<const Self>

Definition at line 71 of file itkImageAdaptor.h.

◆ ConstWeakPointer

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::ConstWeakPointer = WeakPointer<const Self>

Definition at line 72 of file itkImageAdaptor.h.

◆ DirectionType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::DirectionType = typename Superclass::DirectionType

Direction type alias support The Direction is a matix of direction cosines that specify the direction between samples.

Definition at line 128 of file itkImageAdaptor.h.

◆ IndexType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::IndexType = typename Superclass::IndexType

Index type alias support An index is used to access pixel values.

Definition at line 102 of file itkImageAdaptor.h.

◆ IndexValueType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::IndexValueType = typename IndexType::IndexValueType

Definition at line 103 of file itkImageAdaptor.h.

◆ InternalImageType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::InternalImageType = TImage

Typedef of unadapted image

Definition at line 78 of file itkImageAdaptor.h.

◆ InternalPixelPointerType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::InternalPixelPointerType = InternalPixelType *

Convenient type alias.

Definition at line 275 of file itkImageAdaptor.h.

◆ InternalPixelType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::InternalPixelType = typename TAccessor::InternalType

Pixel type alias support Used to declare pixel type in filters or other operations.

Definition at line 89 of file itkImageAdaptor.h.

◆ IOPixelType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::IOPixelType = PixelType

Definition at line 91 of file itkImageAdaptor.h.

◆ OffsetType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::OffsetType = typename Superclass::OffsetType

Offset type alias support

Definition at line 110 of file itkImageAdaptor.h.

◆ OffsetValueType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::OffsetValueType = typename OffsetType::OffsetValueType

Definition at line 111 of file itkImageAdaptor.h.

◆ PixelContainer

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::PixelContainer = typename TImage::PixelContainer

PixelContainer type alias support Used to construct a container for the pixel data.

Definition at line 239 of file itkImageAdaptor.h.

◆ PixelContainerConstPointer

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::PixelContainerConstPointer = typename TImage::PixelContainerConstPointer

Definition at line 241 of file itkImageAdaptor.h.

◆ PixelContainerPointer

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::PixelContainerPointer = typename TImage::PixelContainerPointer

Definition at line 240 of file itkImageAdaptor.h.

◆ PixelType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::PixelType = typename TAccessor::ExternalType

Pixel type alias support Used to declare pixel type in filters or other operations.

Definition at line 85 of file itkImageAdaptor.h.

◆ Pointer

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::Pointer = SmartPointer<Self>

Definition at line 70 of file itkImageAdaptor.h.

◆ PointType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::PointType = typename Superclass::PointType

Origin type alias support The origin is the geometric coordinates of the index (0,0).

Definition at line 123 of file itkImageAdaptor.h.

◆ RebindImageType

template<typename TImage, typename TAccessor>
template<typename UPixelType , unsigned int NUImageDimension = TImage::ImageDimension>
using itk::ImageAdaptor< TImage, TAccessor >::RebindImageType = itk::Image<UPixelType, NUImageDimension>

Definition at line 144 of file itkImageAdaptor.h.

◆ RegionType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::RegionType = typename Superclass::RegionType

Region type alias support A region is used to specify a subset of an image.

Definition at line 115 of file itkImageAdaptor.h.

◆ Self

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::Self = ImageAdaptor

Standard class type aliases.

Definition at line 68 of file itkImageAdaptor.h.

◆ SizeType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::SizeType = typename Superclass::SizeType

Size type alias support A size is used to define region bounds.

Definition at line 106 of file itkImageAdaptor.h.

◆ SizeValueType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::SizeValueType = typename SizeType::SizeValueType

Definition at line 107 of file itkImageAdaptor.h.

◆ SpacingType

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::SpacingType = typename Superclass::SpacingType

Spacing type alias support Spacing holds the size of a pixel. The spacing is the geometric distance between image samples.

Definition at line 119 of file itkImageAdaptor.h.

◆ Superclass

template<typename TImage, typename TAccessor>
using itk::ImageAdaptor< TImage, TAccessor >::Superclass = ImageBase<Self::ImageDimension>

Definition at line 69 of file itkImageAdaptor.h.

Constructor & Destructor Documentation

◆ ImageAdaptor()

template<typename TImage, typename TAccessor>
itk::ImageAdaptor< TImage, TAccessor >::ImageAdaptor ( )
protected

◆ ~ImageAdaptor()

template<typename TImage, typename TAccessor>
itk::ImageAdaptor< TImage, TAccessor >::~ImageAdaptor ( )
overrideprotecteddefault

Member Function Documentation

◆ Allocate()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::Allocate ( bool  initialize = false)
overridevirtual

Allocate the image memory. Dimension and Size must be set a priori.

Reimplemented from itk::ImageBase< TImage::ImageDimension >.

◆ ComputeIndex()

template<typename TImage, typename TAccessor>
IndexType itk::ImageAdaptor< TImage, TAccessor >::ComputeIndex ( OffsetValueType  offset) const

Compute Index given an Offset

◆ CopyInformation()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::CopyInformation ( const DataObject )
overridevirtual

Copy information from the specified data set. This method is part of the pipeline execution model. By default, a ProcessObject will copy meta-data from the first input to all of its outputs. See ProcessObject::GenerateOutputInformation(). Each subclass of DataObject is responsible for being able to copy whatever meta-data it needs from from another DataObject. The default implementation of this method is empty. If a subclass overrides this method, it should always call its superclass' version.

Reimplemented from itk::DataObject.

◆ CreateAnother()

template<typename TImage, typename TAccessor>
virtual::itk::LightObject::Pointer itk::ImageAdaptor< TImage, TAccessor >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

Reimplemented in itk::NthElementImageAdaptor< TImage, TOutputPixelType >.

◆ GetBufferedRegion()

template<typename TImage, typename TAccessor>
const RegionType& itk::ImageAdaptor< TImage, TAccessor >::GetBufferedRegion ( ) const
overridevirtual

Get the region object that defines the size and starting index of the region of the image currently loaded in memory. This method overloads the one in ImageBase in order to delegate to the adapted image.

See also
ImageRegion, SetLargestPossibleRegion(), SetRequestedRegion()

Reimplemented from itk::ImageBase< TImage::ImageDimension >.

◆ GetBufferPointer() [1/2]

template<typename TImage, typename TAccessor>
InternalPixelType* itk::ImageAdaptor< TImage, TAccessor >::GetBufferPointer ( )

Return a pointer to the beginning of the buffer. This is used by the image iterator class.

◆ GetBufferPointer() [2/2]

template<typename TImage, typename TAccessor>
const InternalPixelType* itk::ImageAdaptor< TImage, TAccessor >::GetBufferPointer ( ) const

◆ GetDirection()

template<typename TImage, typename TAccessor>
const DirectionType& itk::ImageAdaptor< TImage, TAccessor >::GetDirection ( ) const
overridevirtual

Get the direction cosines of the image. The direction cosines are vectors that point from one pixel to the next. For ImageBase and Image, the default direction is identity.

Reimplemented from itk::ImageBase< TImage::ImageDimension >.

◆ GetLargestPossibleRegion()

template<typename TImage, typename TAccessor>
const RegionType& itk::ImageAdaptor< TImage, TAccessor >::GetLargestPossibleRegion ( ) const
overridevirtual

Get the region object that defines the size and starting index for the largest possible region this image could represent. This is used in determining how much memory would be needed to load an entire dataset. It is also used to determine boundary conditions. This method overloads the one in ImageBase in order to delegate to the adapted image.

See also
ImageRegion, GetBufferedRegion(), GetRequestedRegion()

Reimplemented from itk::ImageBase< TImage::ImageDimension >.

◆ GetMTime()

template<typename TImage, typename TAccessor>
ModifiedTimeType itk::ImageAdaptor< TImage, TAccessor >::GetMTime ( ) const
overridevirtual

Delegate GetMTime to the Internal Image

Reimplemented from itk::Object.

◆ GetNameOfClass()

template<typename TImage, typename TAccessor>
virtual const char* itk::ImageAdaptor< TImage, TAccessor >::GetNameOfClass ( ) const
virtual

◆ GetOffsetTable()

template<typename TImage, typename TAccessor>
const OffsetValueType* itk::ImageAdaptor< TImage, TAccessor >::GetOffsetTable ( ) const

Get the OffsetTable from the adapted image

◆ GetOrigin()

template<typename TImage, typename TAccessor>
const PointType& itk::ImageAdaptor< TImage, TAccessor >::GetOrigin ( ) const
overridevirtual

Get the origin of the image. The origin is the geometric coordinates of the image origin.

See also
SetOrigin()

Reimplemented from itk::ImageBase< TImage::ImageDimension >.

◆ GetPixel()

template<typename TImage, typename TAccessor>
PixelType itk::ImageAdaptor< TImage, TAccessor >::GetPixel ( const IndexType index) const
inline

Get a pixel (read only version)

Definition at line 221 of file itkImageAdaptor.h.

◆ GetPixelAccessor() [1/2]

template<typename TImage, typename TAccessor>
AccessorType& itk::ImageAdaptor< TImage, TAccessor >::GetPixelAccessor ( )
inline

Return the Data Accesor object

Definition at line 341 of file itkImageAdaptor.h.

Referenced by itk::NthElementImageAdaptor< TImage, TOutputPixelType >::SelectNthElement().

◆ GetPixelAccessor() [2/2]

template<typename TImage, typename TAccessor>
const AccessorType& itk::ImageAdaptor< TImage, TAccessor >::GetPixelAccessor ( ) const
inline

Return the Data Accesor object

Definition at line 348 of file itkImageAdaptor.h.

◆ GetPixelContainer() [1/2]

template<typename TImage, typename TAccessor>
PixelContainerPointer itk::ImageAdaptor< TImage, TAccessor >::GetPixelContainer ( )
inline

Return a pointer to the container.

Definition at line 245 of file itkImageAdaptor.h.

◆ GetPixelContainer() [2/2]

template<typename TImage, typename TAccessor>
const PixelContainer* itk::ImageAdaptor< TImage, TAccessor >::GetPixelContainer ( ) const
inline

Definition at line 251 of file itkImageAdaptor.h.

◆ GetRequestedRegion()

template<typename TImage, typename TAccessor>
const RegionType& itk::ImageAdaptor< TImage, TAccessor >::GetRequestedRegion ( ) const
overridevirtual

Get the region object that defines the size and starting index for the region of the image requested (i.e., the region of the image to be operated on by a filter). This method overloads the one in ImageBase in order to delegate to the adapted image.

See also
ImageRegion, SetLargestPossibleRegion(), SetBufferedRegion()

Reimplemented from itk::ImageBase< TImage::ImageDimension >.

◆ GetSpacing()

template<typename TImage, typename TAccessor>
const SpacingType& itk::ImageAdaptor< TImage, TAccessor >::GetSpacing ( ) const
overridevirtual

Get the spacing (size of a pixel) of the image. The spacing is the geometric distance between image samples.

See also
SetSpacing()

Reimplemented from itk::ImageBase< TImage::ImageDimension >.

◆ Graft() [1/2]

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::Graft ( const DataObject image)
overrideprotectedvirtual

Graft the data and information from one image to another. This is a convenience method to setup a second image with all the meta information of another image and use the same pixel container. Note that this method is different than just using two SmartPointers to the same image since separate DataObjects are still maintained. This method is similar to ImageSource::GraftOutput(). The implementation in ImageBase simply calls CopyInformation() and copies the region ivars. Subclasses of ImageBase are responsible for copying the pixel container.

Reimplemented from itk::ImageBase< TImage::ImageDimension >.

◆ Graft() [2/2]

template<typename TImage, typename TAccessor>
virtual void itk::ImageAdaptor< TImage, TAccessor >::Graft ( const Self imgData)
virtual

Graft the data and information from one image to another. This is a convenience method to setup a second image with all the meta information of another image and use the same pixel container. Note that this method is different than just using two SmartPointers to the same image since separate DataObjects are still maintained. This method is similar to ImageSource::GraftOutput(). The implementation in ImageBase simply calls CopyInformation() and copies the region ivars. The implementation here refers to the superclass' implementation and then copies over the pixel container.

Reimplemented from itk::ImageBase< TImage::ImageDimension >.

◆ Initialize()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::Initialize ( )
overridevirtual

Restore the data object to its initial state. This means releasing memory.

Reimplemented from itk::DataObject.

◆ Modified()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::Modified ( ) const
overridevirtual

Delegate Modified to the Internal Image

Reimplemented from itk::Object.

Referenced by itk::NthElementImageAdaptor< TImage, TOutputPixelType >::SelectNthElement().

◆ New()

template<typename TImage, typename TAccessor>
static Pointer itk::ImageAdaptor< TImage, TAccessor >::New ( )
static

Method for creation through the object factory.

◆ operator[]()

template<typename TImage, typename TAccessor>
PixelType itk::ImageAdaptor< TImage, TAccessor >::operator[] ( const IndexType index) const
inline

Access a pixel. This version can only be an rvalue.

Definition at line 227 of file itkImageAdaptor.h.

◆ PrintSelf()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Who generated this data?

Reimplemented from itk::DataObject.

◆ PropagateRequestedRegion()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::PropagateRequestedRegion ( )
overridevirtual

Methods to update the pipeline. Called internally by the pipeline mechanism.

Reimplemented from itk::DataObject.

◆ SetBufferedRegion()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetBufferedRegion ( const RegionType region)
override

Set the region object that defines the size and starting index of the region of the image currently load in memory.

See also
ImageRegion, SetLargestPossibleRegion(), SetRequestedRegion()

◆ SetDirection()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetDirection ( const DirectionType direction)
override

Set the direction of the image.

◆ SetImage()

template<typename TImage, typename TAccessor>
virtual void itk::ImageAdaptor< TImage, TAccessor >::SetImage ( TImage *  )
virtual

Set Internal Image

◆ SetLargestPossibleRegion()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetLargestPossibleRegion ( const RegionType region)
override

Set the region object that defines the size and starting index for the largest possible region this image could represent. This is used in determining how much memory would be needed to load an entire dataset. It is also used to determine boundary conditions.

See also
ImageRegion, SetBufferedRegion(), SetRequestedRegion()

◆ SetOrigin() [1/3]

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetOrigin ( const double *  origin)
override

◆ SetOrigin() [2/3]

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetOrigin ( const float *  origin)
override

◆ SetOrigin() [3/3]

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetOrigin ( const PointType  origin)
override

Set the origin of the image.

◆ SetPixel()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetPixel ( const IndexType index,
const PixelType value 
)
inline

Set a pixel.

Definition at line 214 of file itkImageAdaptor.h.

◆ SetPixelAccessor()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetPixelAccessor ( const AccessorType accessor)
inline

Sets the Data Accesor object

Definition at line 355 of file itkImageAdaptor.h.

◆ SetPixelContainer()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetPixelContainer ( PixelContainer container)

Set the container to use. Note that this does not cause the DataObject to be modified.

◆ SetRequestedRegion() [1/2]

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetRequestedRegion ( const DataObject data)
overridevirtual

Set the requested region from this data object to match the requested region of the data object passed in as a parameter. This method implements the API from DataObject. The data object parameter must be castable to an ImageBase.

Reimplemented from itk::DataObject.

◆ SetRequestedRegion() [2/2]

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetRequestedRegion ( const RegionType region)
override

Set the region object that defines the size and starting index for the region of the image requested.

See also
ImageRegion, SetLargestPossibleRegion(), SetBufferedRegion()

◆ SetRequestedRegionToLargestPossibleRegion()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetRequestedRegionToLargestPossibleRegion ( )
overridevirtual

Set the RequestedRegion to the LargestPossibleRegion. This forces a filter to produce all of the output in one execution (i.e. not streaming) on the next call to Update().

Reimplemented from itk::DataObject.

◆ SetSpacing() [1/3]

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetSpacing ( const double *  spacing)
override

◆ SetSpacing() [2/3]

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetSpacing ( const float *  spacing)
override

◆ SetSpacing() [3/3]

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::SetSpacing ( const SpacingType spacing)
override

Set the spacing (size of a pixel) of the image.

◆ TransformContinuousIndexToPhysicalPoint()

template<typename TImage, typename TAccessor>
template<typename TCoordRep >
void itk::ImageAdaptor< TImage, TAccessor >::TransformContinuousIndexToPhysicalPoint ( const ContinuousIndex< TCoordRep, Self::ImageDimension > &  index,
Point< TCoordRep, Self::ImageDimension > &  point 
) const
inline

Get a physical point (in the space which the origin and spacing information comes from) from a continuous index (in the index space)

See also
Transform

Definition at line 413 of file itkImageAdaptor.h.

◆ TransformIndexToPhysicalPoint()

template<typename TImage, typename TAccessor>
template<typename TCoordRep >
void itk::ImageAdaptor< TImage, TAccessor >::TransformIndexToPhysicalPoint ( const IndexType index,
Point< TCoordRep, Self::ImageDimension > &  point 
) const
inline

Get a physical point (in the space which the origin and spacing information comes from) from a discrete index (in the index space)

See also
Transform

Definition at line 426 of file itkImageAdaptor.h.

◆ TransformLocalVectorToPhysicalVector() [1/2]

template<typename TImage, typename TAccessor>
template<typename TCoordRep >
void itk::ImageAdaptor< TImage, TAccessor >::TransformLocalVectorToPhysicalVector ( const FixedArray< TCoordRep, Self::ImageDimension > &  inputGradient,
FixedArray< TCoordRep, Self::ImageDimension > &  outputGradient 
) const
inline

Definition at line 433 of file itkImageAdaptor.h.

◆ TransformLocalVectorToPhysicalVector() [2/2]

template<typename TImage, typename TAccessor>
template<typename TVector >
TVector itk::ImageAdaptor< TImage, TAccessor >::TransformLocalVectorToPhysicalVector ( const TVector &  inputGradient) const
inline

Definition at line 441 of file itkImageAdaptor.h.

◆ TransformPhysicalPointToContinuousIndex()

template<typename TImage, typename TAccessor>
template<typename TCoordRep >
bool itk::ImageAdaptor< TImage, TAccessor >::TransformPhysicalPointToContinuousIndex ( const Point< TCoordRep, Self::ImageDimension > &  point,
ContinuousIndex< TCoordRep, Self::ImageDimension > &  index 
) const
inline

Get the continuous index from a physical point.

Returns true if the resulting index is within the image, false otherwise.

See also
Transform

Definition at line 390 of file itkImageAdaptor.h.

◆ TransformPhysicalPointToIndex()

template<typename TImage, typename TAccessor>
template<typename TCoordRep >
bool itk::ImageAdaptor< TImage, TAccessor >::TransformPhysicalPointToIndex ( const Point< TCoordRep, Self::ImageDimension > &  point,
IndexType index 
) const
inline

Get the index (discrete) from a physical point. Floating point index results are truncated to integers. Returns true if the resulting index is within the image, false otherwise

See also
Transform

Definition at line 402 of file itkImageAdaptor.h.

◆ TransformPhysicalVectorToLocalVector() [1/2]

template<typename TImage, typename TAccessor>
template<typename TCoordRep >
void itk::ImageAdaptor< TImage, TAccessor >::TransformPhysicalVectorToLocalVector ( const FixedArray< TCoordRep, Self::ImageDimension > &  inputGradient,
FixedArray< TCoordRep, Self::ImageDimension > &  outputGradient 
) const
inline

Definition at line 450 of file itkImageAdaptor.h.

◆ TransformPhysicalVectorToLocalVector() [2/2]

template<typename TImage, typename TAccessor>
template<typename TVector >
TVector itk::ImageAdaptor< TImage, TAccessor >::TransformPhysicalVectorToLocalVector ( const TVector &  inputGradient) const
inline

Definition at line 458 of file itkImageAdaptor.h.

◆ Update()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::Update ( )
overridevirtual

Return the Data Accesor object

Reimplemented from itk::DataObject.

◆ UpdateAccessor() [1/2]

template<typename TImage, typename TAccessor>
template<typename T >
void itk::ImageAdaptor< TImage, TAccessor >::UpdateAccessor ( T *  )
inlineprivate

Definition at line 487 of file itkImageAdaptor.h.

◆ UpdateAccessor() [2/2]

template<typename TImage, typename TAccessor>
template<typename TPixelType >
void itk::ImageAdaptor< TImage, TAccessor >::UpdateAccessor ( typename ::itk::VectorImage< TPixelType, ImageDimension > *  )
inlineprivate

Definition at line 479 of file itkImageAdaptor.h.

◆ UpdateOutputData()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::UpdateOutputData ( )
overridevirtual

Reimplemented from itk::DataObject.

◆ UpdateOutputInformation()

template<typename TImage, typename TAccessor>
void itk::ImageAdaptor< TImage, TAccessor >::UpdateOutputInformation ( )
overridevirtual

Methods to update the pipeline. Called internally by the pipeline mechanism.

Reimplemented from itk::DataObject.

◆ VerifyRequestedRegion()

template<typename TImage, typename TAccessor>
bool itk::ImageAdaptor< TImage, TAccessor >::VerifyRequestedRegion ( )
overridevirtual

Verify that the RequestedRegion is within the LargestPossibleRegion.

If the RequestedRegion is not within the LargestPossibleRegion, then the filter cannot possibly satisfy the request. This method returns true if the request can be satisfied (even if it will be necessary to process the entire LargestPossibleRegion) and returns false otherwise. This method is used by PropagateRequestedRegion(). PropagateRequestedRegion() throws a InvalidRequestedRegionError exception if the requested region is not within the LargestPossibleRegion. Default implementation simply returns true in order to support DataObjects that do not need regions (for instance itk::EquivalencyTable).

Reimplemented from itk::DataObject.

Member Data Documentation

◆ ImageDimension

template<typename TImage, typename TAccessor>
constexpr unsigned int itk::ImageAdaptor< TImage, TAccessor >::ImageDimension = TImage::ImageDimension
staticconstexpr

Dimension of the image. This constant is used by functions that are templated over image type (as opposed to being templated over pixel type and dimension) when they need compile time access to the dimension of the image.

Definition at line 65 of file itkImageAdaptor.h.

◆ m_Image

template<typename TImage, typename TAccessor>
TImage::Pointer itk::ImageAdaptor< TImage, TAccessor >::m_Image
private

Definition at line 492 of file itkImageAdaptor.h.

◆ m_PixelAccessor

template<typename TImage, typename TAccessor>
AccessorType itk::ImageAdaptor< TImage, TAccessor >::m_PixelAccessor
private

Definition at line 496 of file itkImageAdaptor.h.


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