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();
285#ifndef ITK_FUTURE_LEGACY_REMOVE
287 using InternalPixelPointerType [[deprecated(
"Please just use `InternalPixelType *` instead!")]] =
InternalPixelType *;
398 template <
typename TIndexRep,
typename TCoordinate>
413 template <
typename TCoordinate>
414 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
418 return m_Image->TransformPhysicalPointToContinuousIndex(point, index);
422 template <
typename TCoordinate>
423 [[nodiscard]] IndexType
426 return m_Image->TransformPhysicalPointToIndex(point);
437 template <
typename TCoordinate>
438 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
441 return m_Image->TransformPhysicalPointToIndex(point, index);
448 template <
typename TCoordinate>
453 m_Image->TransformContinuousIndexToPhysicalPoint(index, point);
457 template <
typename TCoordinate,
typename TIndexRep>
469 template <
typename TCoordinate>
473 m_Image->TransformIndexToPhysicalPoint(index, point);
477 template <
typename TCoordinate>
484 template <
typename TCoordinate>
489 m_Image->TransformLocalVectorToPhysicalVector(inputGradient, outputGradient);
492 template <
typename TVector>
493 [[nodiscard]] TVector
496 TVector outputGradient;
498 return outputGradient;
501 template <
typename TCoordinate>
506 m_Image->TransformPhysicalVectorToLocalVector(inputGradient, outputGradient);
509 template <
typename TVector>
510 [[nodiscard]] TVector
513 TVector outputGradient;
515 return outputGradient;
530 template <
typename TPixelType>
538 template <
typename T>
553#ifndef ITK_MANUAL_INSTANTIATION
554# 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