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();
274#ifndef ITK_FUTURE_LEGACY_REMOVE
276 using InternalPixelPointerType [[deprecated(
"Please just use `InternalPixelType *` instead!")]] =
InternalPixelType *;
345 return m_PixelAccessor;
352 return m_PixelAccessor;
359 m_PixelAccessor = accessor;
387 template <
typename TIndexRep,
typename TCoordRep>
391 return m_Image->template TransformPhysicalPointToContinuousIndex<TIndexRep>(
point);
402 template <
typename TCoordRep>
403 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
404 bool TransformPhysicalPointToContinuousIndex(const
Point<TCoordRep,
Self::ImageDimension> &
point,
407 return m_Image->TransformPhysicalPointToContinuousIndex(
point, index);
411 template <
typename TCoordRep>
415 return m_Image->TransformPhysicalPointToIndex(
point);
426 template <
typename TCoordRep>
427 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
430 return m_Image->TransformPhysicalPointToIndex(
point, index);
437 template <
typename TCoordRep>
442 m_Image->TransformContinuousIndexToPhysicalPoint(index,
point);
446 template <
typename TCoordRep,
typename TIndexRep>
450 return m_Image->template TransformContinuousIndexToPhysicalPoint<TIndexRep>(index);
458 template <
typename TCoordRep>
462 m_Image->TransformIndexToPhysicalPoint(index,
point);
466 template <
typename TCoordRep>
470 return m_Image->template TransformIndexToPhysicalPoint<TCoordRep>(index);
473 template <
typename TCoordRep>
478 m_Image->TransformLocalVectorToPhysicalVector(inputGradient, outputGradient);
481 template <
typename TVector>
482 [[nodiscard]] TVector
485 TVector outputGradient;
486 TransformLocalVectorToPhysicalVector(inputGradient, outputGradient);
487 return outputGradient;
490 template <
typename TCoordRep>
495 m_Image->TransformPhysicalVectorToLocalVector(inputGradient, outputGradient);
498 template <
typename TVector>
499 [[nodiscard]] TVector
502 TVector outputGradient;
503 TransformPhysicalVectorToLocalVector(inputGradient, outputGradient);
504 return outputGradient;
514 using Superclass::Graft;
519 template <
typename TPixelType>
523 this->m_PixelAccessor.SetVectorLength(this->m_Image->GetNumberOfComponentsPerPixel());
527 template <
typename T>
542#ifndef ITK_MANUAL_INSTANTIATION
543# 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
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