18#ifndef itkImageAdaptor_h
19#define itkImageAdaptor_h
26template <
typename TPixelType,
unsigned int VImageDimension>
55template <
typename TImage,
typename TAccessor>
137 template <
typename UPixelType,
unsigned int UImageDimension = TImage::ImageDimension>
143 template <
typename UPixelType,
unsigned int VUImageDimension = TImage::ImageDimension>
245 return m_Image->ComputeOffset(index);
258 return m_Image->GetPixelContainer();
261 const PixelContainer *
264 return m_Image->GetPixelContainer();
286#ifndef ITK_FUTURE_LEGACY_REMOVE
288 using InternalPixelPointerType [[deprecated(
"Please just use `InternalPixelType *` instead!")]] =
InternalPixelType *;
399 template <
typename TIndexRep,
typename TCoordinate>
414 template <
typename TCoordinate>
415 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
419 return m_Image->TransformPhysicalPointToContinuousIndex(point, index);
423 template <
typename TCoordinate>
424 [[nodiscard]] IndexType
427 return m_Image->TransformPhysicalPointToIndex(point);
438 template <
typename TCoordinate>
439 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
442 return m_Image->TransformPhysicalPointToIndex(point, index);
449 template <
typename TCoordinate>
454 m_Image->TransformContinuousIndexToPhysicalPoint(index, point);
458 template <
typename TCoordinate,
typename TIndexRep>
470 template <
typename TCoordinate>
474 m_Image->TransformIndexToPhysicalPoint(index, point);
478 template <
typename TCoordinate>
485 template <
typename TCoordinate>
490 m_Image->TransformLocalVectorToPhysicalVector(inputGradient, outputGradient);
493 template <
typename TVector>
494 [[nodiscard]] TVector
497 TVector outputGradient;
499 return outputGradient;
502 template <
typename TCoordinate>
507 m_Image->TransformPhysicalVectorToLocalVector(inputGradient, outputGradient);
510 template <
typename TVector>
511 [[nodiscard]] TVector
514 TVector outputGradient;
516 return outputGradient;
531 template <
typename TPixelType>
539 template <
typename T>
554#ifndef ITK_MANUAL_INSTANTIATION
555# 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.
void SetOrigin(const float *origin) override
void CopyInformation(const DataObject *data) override
typename InternalImageType::AccessorFunctorType::template Rebind< Self >::Type AccessorFunctorType
OffsetValueType ComputeOffset(const IndexType &index) const
static constexpr unsigned int ImageDimension
typename OffsetType::OffsetValueType OffsetValueType
void SetOrigin(const double *origin) override
void SetPixelContainer(PixelContainer *container)
SmartPointer< Self > Pointer
void UpdateAccessor(itk::VectorImage< TPixelType, ImageDimension > *dummy)
const PointType & GetOrigin() const override
void Modified() const override
ImageBase< Self::ImageDimension > Superclass
void SetPixel(const IndexType &index, const PixelType &value)
void Initialize() override
PixelContainerPointer GetPixelContainer()
void SetRequestedRegion(const DataObject *data) override
typename TImage::PixelContainerPointer PixelContainerPointer
typename SizeType::SizeValueType SizeValueType
void TransformPhysicalVectorToLocalVector(const FixedArray< TCoordinate, Self::ImageDimension > &inputGradient, FixedArray< TCoordinate, Self::ImageDimension > &outputGradient) const
void PropagateRequestedRegion() override
void SetRequestedRegion(const RegionType ®ion) override
void UpdateAccessor(T *dummy)
const PixelContainer * GetPixelContainer() const
AccessorType m_PixelAccessor
PixelType operator[](const IndexType &index) const
typename IndexType::IndexValueType IndexValueType
void TransformLocalVectorToPhysicalVector(const FixedArray< TCoordinate, Self::ImageDimension > &inputGradient, FixedArray< TCoordinate, Self::ImageDimension > &outputGradient) const
const DirectionType & GetDirection() const override
bool VerifyRequestedRegion() override
void UpdateOutputInformation() override
void SetSpacing(const SpacingType &spacing) override
void TransformIndexToPhysicalPoint(const IndexType &index, Point< TCoordinate, Self::ImageDimension > &point) const
void SetBufferedRegion(const RegionType ®ion) override
void SetSpacing(const double *spacing) override
Point< TCoordinate, TImage::ImageDimension > TransformContinuousIndexToPhysicalPoint(const ContinuousIndex< TIndexRep, Self::ImageDimension > &index) const
void SetDirection(const DirectionType &direction) override
TVector TransformPhysicalVectorToLocalVector(const TVector &inputGradient) const
ModifiedTimeType GetMTime() const override
void UpdateOutputData() override
itk::Image< UPixelType, VUImageDimension > RebindImageType
AccessorType & GetPixelAccessor()
const AccessorType & GetPixelAccessor() const
void TransformContinuousIndexToPhysicalPoint(const ContinuousIndex< TCoordinate, Self::ImageDimension > &index, Point< TCoordinate, Self::ImageDimension > &point) const
TVector TransformLocalVectorToPhysicalVector(const TVector &inputGradient) const
typename Accessor::AbsPixelAccessor< typename TImage::PixelType, TOutputPixelType >::ExternalType PixelType
void Allocate(bool initialize=false) override
void SetPixelAccessor(const AccessorType &accessor)
const RegionType & GetLargestPossibleRegion() const override
void SetRequestedRegionToLargestPossibleRegion() override
Point< TCoordinate, Self::ImageDimension > TransformIndexToPhysicalPoint(const IndexType &index) const
Accessor::AbsPixelAccessor< typename TImage::PixelType, TOutputPixelType > AccessorType
IndexType TransformPhysicalPointToIndex(const Point< TCoordinate, Self::ImageDimension > &point) const
void SetOrigin(const PointType origin) override
~ImageAdaptor() override=default
SmartPointer< const Self > ConstPointer
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
const InternalPixelType * GetBufferPointer() const
virtual void SetImage(TImage *)
const RegionType & GetRequestedRegion() const override
IndexType ComputeIndex(OffsetValueType offset) const
const SpacingType & GetSpacing() const override
WeakPointer< const Self > ConstWeakPointer
void Graft(const DataObject *data) override
ContinuousIndex< TIndexRep, TImage::ImageDimension > TransformPhysicalPointToContinuousIndex(const Point< TCoordinate, TImage::ImageDimension > &point) const
typename TImage::PixelContainerConstPointer PixelContainerConstPointer
InternalPixelType * GetBufferPointer()
virtual void Graft(const Self *imgData)
const RegionType & GetBufferedRegion() const override
typename Accessor::AbsPixelAccessor< typename TImage::PixelType, TOutputPixelType >::InternalType InternalPixelType
Vector< SpacingValueType, VImageDimension > SpacingType
ImageRegion< VImageDimension > RegionType
Index< VImageDimension > IndexType
Offset< VImageDimension > OffsetType
virtual void Graft(const Self *image)
Matrix< SpacePrecisionType, VImageDimension, VImageDimension > DirectionType
Size< VImageDimension > SizeType
Point< PointValueType, VImageDimension > PointType
Templated n-dimensional image class.
Control indentation during Print() invocation.
A templated class holding a geometric point in n-Dimensional space.
Implements transparent reference counting.
Templated n-dimensional vector image class.
Implements a weak reference to an object.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType ModifiedTimeType
Image< UPixelType, UImageDimension > Type
itk::IndexValueType IndexValueType
itk::OffsetValueType OffsetValueType
itk::SizeValueType SizeValueType