|
ITK
5.2.0
Insight Toolkit
|
Go to the documentation of this file.
85 template <
typename TPixel,
unsigned int VImageDimension = 2>
89 ITK_DISALLOW_COPY_AND_MOVE(
Image);
174 template <
typename UPixelType,
unsigned int NUImageDimension = VImageDimension>
181 template <
typename UPixelType,
unsigned int NUImageDimension = VImageDimension>
188 Allocate(
bool initializePixels =
false)
override;
193 Initialize()
override;
198 FillBuffer(
const TPixel & value);
209 (*m_Buffer)[offset] = value;
220 return ((*m_Buffer)[offset]);
231 return ((*m_Buffer)[offset]);
251 return m_Buffer ? m_Buffer->GetBufferPointer() :
nullptr;
253 virtual const TPixel *
256 return m_Buffer ? m_Buffer->GetBufferPointer() :
nullptr;
264 return m_Buffer.GetPointer();
267 const PixelContainer *
270 return m_Buffer.GetPointer();
276 SetPixelContainer(PixelContainer * container);
289 Graft(
const Self * image);
306 NeighborhoodAccessorFunctorType
313 const NeighborhoodAccessorFunctorType
320 GetNumberOfComponentsPerPixel()
const override;
346 const auto bufferSize = lhsBuffer.Size();
348 if (bufferSize != rhsBuffer.Size())
353 const TPixel *
const lhsBufferPointer = lhsBuffer.GetBufferPointer();
354 const TPixel *
const rhsBufferPointer = rhsBuffer.GetBufferPointer();
356 return ((lhsBufferPointer == rhsBufferPointer) ||
357 std::equal(lhsBufferPointer, lhsBufferPointer + bufferSize, rhsBufferPointer));
364 return !(lhs == rhs);
370 PrintSelf(std::ostream & os,
Indent indent)
const override;
374 ~
Image()
override =
default;
382 ComputeIndexToPhysicalPointMatrices()
override;
383 using Superclass::Graft;
391 #ifndef ITK_MANUAL_INSTANTIATION
392 # include "itkImage.hxx"
typename OffsetType::OffsetValueType OffsetValueType
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
friend bool operator==(const Image &lhs, const Image &rhs)
virtual const RegionType & GetBufferedRegion() const
const AccessorType GetPixelAccessor() const
ImageBaseType::DirectionType DirectionType
Represent a n-dimensional size (bounds) of a n-dimensional image.
PixelContainerPointer m_Buffer
Base class for templated image classes.
An image region represents a structured region of data.
typename SizeType::SizeValueType SizeValueType
ImageBaseType::PointType PointType
const TPixel & GetPixel(const IndexType &index) const
Get a pixel (read only version).
ImageBaseType::SizeType SizeType
Give access to partial aspects a type.
Control indentation during Print() invocation.
virtual const TPixel * GetBufferPointer() const
typename IndexType::IndexValueType IndexValueType
Provides accessor interfaces to Get pixels and is meant to be used on pointers contained within Neigh...
AccessorType GetPixelAccessor()
ImageBaseType::IndexType IndexType
Provides a common API for pixel accessors for Image and VectorImage.
unsigned int ImageDimensionType
ImageBaseType::RegionType RegionType
void SetPixel(const IndexType &index, const TPixel &value)
Set a pixel value.
TNode * InternalPixelType
TPixel & GetPixel(const IndexType &index)
Get a reference to a pixel (e.g. for editing).
Defines an itk::Image front-end to a standard C-array.
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.
SpacePrecisionType SpacingValueType
Implements a weak reference to an object.
const PixelContainer * GetPixelContainer() const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
typename PixelContainer::ConstPointer PixelContainerConstPointer
signed long OffsetValueType
const TPixel & operator[](const IndexType &index) const
Access a pixel. This version can only be an rvalue.
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
friend bool operator!=(const Image &lhs, const Image &rhs)
signed long IndexValueType
Base class for most ITK classes.
Templated n-dimensional image class.
virtual TPixel * GetBufferPointer()
TPixel & operator[](const IndexType &index)
Access a pixel. This version can be an lvalue.
typename PixelContainer::Pointer PixelContainerPointer
PixelContainer * GetPixelContainer()
DirectionType m_InverseDirection
DirectionType m_Direction
unsigned long SizeValueType
Base class for all data objects in ITK.