87template <
typename TPixel,
unsigned int VImageDimension = 2>
91 ITK_DISALLOW_COPY_AND_MOVE(
Image);
104 itkOverrideGetNameOfClassMacro(
Image);
176 template <
typename UPixelType,
unsigned int VUImageDimension = VImageDimension>
183 template <
typename UPixelType,
unsigned int VUImageDimension = VImageDimension>
211 (*m_Buffer)[offset] = value;
263 virtual const TPixel *
277 const PixelContainer *
316 NeighborhoodAccessorFunctorType
323 const NeighborhoodAccessorFunctorType
337 template <
typename TEqualityComparable>
338 friend std::enable_if_t<std::is_same_v<TEqualityComparable, TPixel>,
bool>
362 const auto bufferSize = lhsBuffer.Size();
364 if (bufferSize != rhsBuffer.Size())
369 const TEqualityComparable *
const lhsBufferPointer = lhsBuffer.GetBufferPointer();
370 const TEqualityComparable *
const rhsBufferPointer = rhsBuffer.GetBufferPointer();
372 return ((lhsBufferPointer == rhsBufferPointer) ||
373 std::equal(lhsBufferPointer, lhsBufferPointer + bufferSize, rhsBufferPointer));
377 template <
typename TEqualityComparable>
378 friend std::enable_if_t<std::is_same_v<TEqualityComparable, TPixel>,
bool>
382 return !(lhs == rhs);
409#ifndef ITK_MANUAL_INSTANTIATION
410# include "itkImage.hxx"
Base class for all data objects in ITK.
Provides a common API for pixel accessors for Image and VectorImage.
Give access to partial aspects a type.
Vector< SpacingValueType, VImageDimension > SpacingType
ImageRegion< VImageDimension > RegionType
SpacePrecisionType SpacingValueType
unsigned int ImageDimensionType
virtual const RegionType & GetBufferedRegion() const
Index< VImageDimension > IndexType
Offset< VImageDimension > OffsetType
DirectionType m_Direction
OffsetValueType FastComputeOffset(const IndexType &ind) const
typename OffsetType::OffsetValueType OffsetValueType
typename IndexType::IndexValueType IndexValueType
virtual void Graft(const Self *image)
Matrix< SpacePrecisionType, VImageDimension, VImageDimension > DirectionType
Size< VImageDimension > SizeType
Point< PointValueType, VImageDimension > PointType
DirectionType m_InverseDirection
typename SizeType::SizeValueType SizeValueType
Templated n-dimensional image class.
void PrintSelf(std::ostream &os, Indent indent) const override
const AccessorType GetPixelAccessor() const
PixelContainerPointer m_Buffer
unsigned int GetNumberOfComponentsPerPixel() const override
AccessorType GetPixelAccessor()
SmartPointer< const Self > ConstPointer
friend std::enable_if_t< std::is_same_v< TEqualityComparable, TPixel >, bool > operator==(const Image< TEqualityComparable, VImageDimension > &lhs, const Image< TEqualityComparable, VImageDimension > &rhs)
virtual void Graft(const Self *image)
const PixelContainer * GetPixelContainer() const
friend std::enable_if_t< std::is_same_v< TEqualityComparable, TPixel >, bool > operator!=(const Image< TEqualityComparable, VImageDimension > &lhs, const Image< TEqualityComparable, VImageDimension > &rhs)
WeakPointer< const Self > ConstWeakPointer
ImageBase< VImageDimension > Superclass
const TPixel & operator[](const IndexType &index) const
Access a pixel. This version can only be an rvalue.
void SetPixel(const IndexType &index, const TPixel &value)
Set a pixel value.
unsigned char InternalPixelType
TPixel & GetPixel(const IndexType &index)
Get a reference to a pixel (e.g. for editing).
virtual const TPixel * GetBufferPointer() const
virtual TPixel * GetBufferPointer()
void Graft(const DataObject *data) override
void SetPixelContainer(PixelContainer *container)
NeighborhoodAccessorFunctor< Self > NeighborhoodAccessorFunctorType
DefaultPixelAccessor< PixelType > AccessorType
typename PixelContainer::ConstPointer PixelContainerConstPointer
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
void Allocate(bool initializePixels=false) override
itk::Image< UPixelType, VUImageDimension > RebindImageType
void FillBuffer(const TPixel &value)
typename PixelContainer::Pointer PixelContainerPointer
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
void Initialize() override
~Image() override=default
ImportImageContainer< SizeValueType, PixelType > PixelContainer
DefaultPixelAccessorFunctor< Self > AccessorFunctorType
PixelContainer * GetPixelContainer()
const TPixel & GetPixel(const IndexType &index) const
Get a pixel (read only version).
SmartPointer< Self > Pointer
void ComputeIndexToPhysicalPointMatrices() override
typename OffsetType::OffsetValueType OffsetValueType
Index< VImageDimension > IndexType
TPixel & operator[](const IndexType &index)
Access a pixel. This version can be an lvalue.
Defines an itk::Image front-end to a standard C-array.
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
Provides accessor interfaces to Get pixels and is meant to be used on pointers contained within Neigh...
Implements transparent reference counting.
Implements a weak reference to an object.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
itk::Image< UPixelType, VUImageDimension > Type