18#ifndef itkImageAdaptor_h
19#define itkImageAdaptor_h
26template <
typename TPixelType,
unsigned int VImageDimension>
55template <
typename TImage,
typename TAccessor>
65 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
110 using typename Superclass::OffsetType;
119 using typename Superclass::SpacingType;
137 template <
typename UPixelType,
unsigned int UImageDimension = TImage::ImageDimension>
143 template <
typename UPixelType,
unsigned int VUImageDimension = TImage::ImageDimension>
216 m_PixelAccessor.Set(m_Image->GetPixel(index), value);
223 return m_PixelAccessor.Get(m_Image->GetPixel(index));
247 return m_Image->GetPixelContainer();
250 const PixelContainer *
253 return m_Image->GetPixelContainer();
343 return m_PixelAccessor;
350 return m_PixelAccessor;
357 m_PixelAccessor = accessor;
385 template <
typename TIndexRep,
typename TCoordRep>
389 return m_Image->template TransformPhysicalPointToContinuousIndex<TIndexRep>(
point);
400 template <
typename TCoordRep>
401 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
402 bool TransformPhysicalPointToContinuousIndex(const
Point<TCoordRep,
Self::ImageDimension> &
point,
405 return m_Image->TransformPhysicalPointToContinuousIndex(
point, index);
409 template <
typename TCoordRep>
413 return m_Image->TransformPhysicalPointToIndex(
point);
424 template <
typename TCoordRep>
425 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
428 return m_Image->TransformPhysicalPointToIndex(
point, index);
435 template <
typename TCoordRep>
440 m_Image->TransformContinuousIndexToPhysicalPoint(index,
point);
444 template <
typename TCoordRep,
typename TIndexRep>
448 return m_Image->template TransformContinuousIndexToPhysicalPoint<TIndexRep>(index);
456 template <
typename TCoordRep>
460 m_Image->TransformIndexToPhysicalPoint(index,
point);
464 template <
typename TCoordRep>
468 return m_Image->template TransformIndexToPhysicalPoint<TCoordRep>(index);
471 template <
typename TCoordRep>
476 m_Image->TransformLocalVectorToPhysicalVector(inputGradient, outputGradient);
479 template <
typename TVector>
480 [[nodiscard]] TVector
483 TVector outputGradient;
484 TransformLocalVectorToPhysicalVector(inputGradient, outputGradient);
485 return outputGradient;
488 template <
typename TCoordRep>
493 m_Image->TransformPhysicalVectorToLocalVector(inputGradient, outputGradient);
496 template <
typename TVector>
497 [[nodiscard]] TVector
500 TVector outputGradient;
501 TransformPhysicalVectorToLocalVector(inputGradient, outputGradient);
502 return outputGradient;
512 using Superclass::Graft;
517 template <
typename TPixelType>
521 this->m_PixelAccessor.SetVectorLength(this->m_Image->GetNumberOfComponentsPerPixel());
525 template <
typename T>
540#ifndef ITK_MANUAL_INSTANTIATION
541# include "itkImageAdaptor.hxx"
A templated class holding a point in n-Dimensional image space.
Base class for all data objects in ITK.
Simulate a standard C array with copy semantics.
Give access to partial aspects of voxels from an Image.
void SetOrigin(const float *origin) override
void CopyInformation(const DataObject *data) override
typename InternalImageType::AccessorFunctorType::template Rebind< Self >::Type AccessorFunctorType
typename OffsetType::OffsetValueType OffsetValueType
void SetOrigin(const double *origin) override
void SetPixelContainer(PixelContainer *container)
const PointType & GetOrigin() const override
void Modified() const override
void SetPixel(const IndexType &index, const PixelType &value)
void Initialize() override
PixelContainerPointer GetPixelContainer()
void SetRequestedRegion(const DataObject *data) override
typename TImage::PixelContainerPointer PixelContainerPointer
InternalPixelType * InternalPixelPointerType
void TransformLocalVectorToPhysicalVector(const FixedArray< TCoordRep, Self::ImageDimension > &inputGradient, FixedArray< TCoordRep, Self::ImageDimension > &outputGradient) const
typename SizeType::SizeValueType SizeValueType
void PropagateRequestedRegion() override
void UpdateAccessor(typename itk::VectorImage< TPixelType, ImageDimension > *)
void SetRequestedRegion(const RegionType ®ion) override
const PixelContainer * GetPixelContainer() const
PixelType operator[](const IndexType &index) const
Point< TCoordRep, TImage::ImageDimension > TransformContinuousIndexToPhysicalPoint(const ContinuousIndex< TIndexRep, Self::ImageDimension > &index) const
typename IndexType::IndexValueType IndexValueType
const DirectionType & GetDirection() const override
bool VerifyRequestedRegion() override
void UpdateOutputInformation() override
void SetSpacing(const SpacingType &spacing) override
void SetBufferedRegion(const RegionType ®ion) override
void SetSpacing(const double *spacing) override
void SetDirection(const DirectionType &direction) override
TVector TransformPhysicalVectorToLocalVector(const TVector &inputGradient) const
void TransformPhysicalVectorToLocalVector(const FixedArray< TCoordRep, Self::ImageDimension > &inputGradient, FixedArray< TCoordRep, Self::ImageDimension > &outputGradient) const
ModifiedTimeType GetMTime() const override
void UpdateOutputData() override
Point< TCoordRep, Self::ImageDimension > TransformIndexToPhysicalPoint(const IndexType &index) const
AccessorType & GetPixelAccessor()
void TransformIndexToPhysicalPoint(const IndexType &index, Point< TCoordRep, Self::ImageDimension > &point) const
const AccessorType & GetPixelAccessor() const
TVector TransformLocalVectorToPhysicalVector(const TVector &inputGradient) const
typename TAccessor::ExternalType PixelType
void Allocate(bool initialize=false) override
void SetPixelAccessor(const AccessorType &accessor)
const RegionType & GetLargestPossibleRegion() const override
void SetRequestedRegionToLargestPossibleRegion() override
void TransformContinuousIndexToPhysicalPoint(const ContinuousIndex< TCoordRep, Self::ImageDimension > &index, Point< TCoordRep, Self::ImageDimension > &point) const
void SetOrigin(const PointType origin) override
~ImageAdaptor() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename TImage::PixelContainer PixelContainer
void SetSpacing(const float *spacing) override
const OffsetValueType * GetOffsetTable() const
PixelType GetPixel(const IndexType &index) const
void SetLargestPossibleRegion(const RegionType ®ion) override
ContinuousIndex< TIndexRep, TImage::ImageDimension > TransformPhysicalPointToContinuousIndex(const Point< TCoordRep, TImage::ImageDimension > &point) const
const InternalPixelType * GetBufferPointer() const
virtual void SetImage(TImage *)
const RegionType & GetRequestedRegion() const override
IndexType ComputeIndex(OffsetValueType offset) const
const SpacingType & GetSpacing() const override
void Graft(const DataObject *data) override
typename TImage::PixelContainerConstPointer PixelContainerConstPointer
InternalPixelType * GetBufferPointer()
virtual void Graft(const Self *imgData)
const RegionType & GetBufferedRegion() const override
IndexType TransformPhysicalPointToIndex(const Point< TCoordRep, Self::ImageDimension > &point) const
typename TAccessor::InternalType InternalPixelType
Base class for templated image classes.
An image region represents a structured region of data.
Templated n-dimensional image class.
Control indentation during Print() invocation.
Base class for most ITK classes.
Templated n-dimensional vector image class.
Implements a weak reference to an object.
SmartPointer< Self > Pointer
ImageBaseType::DirectionType DirectionType
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents
SizeValueType ModifiedTimeType
unsigned long SizeValueType