74 template<
typename TPixel,
unsigned int VImageDimension = 2 >
78 ITK_DISALLOW_COPY_AND_ASSIGN(
Image);
163 template <
typename UPixelType,
unsigned int NUImageDimension = VImageDimension>
170 template <
typename UPixelType,
unsigned int NUImageDimension = VImageDimension>
176 void Allocate(
bool initializePixels =
false)
override;
180 void Initialize()
override;
184 void FillBuffer(
const TPixel & value);
194 ( *m_Buffer )[offset] = value;
204 return ( ( *m_Buffer )[offset] );
214 return ( ( *m_Buffer )[offset] );
222 {
return this->GetPixel(index); }
229 {
return this->GetPixel(index); }
234 {
return m_Buffer ? m_Buffer->GetBufferPointer() :
nullptr; }
236 {
return m_Buffer ? m_Buffer->GetBufferPointer() :
nullptr; }
241 {
return m_Buffer.GetPointer(); }
244 {
return m_Buffer.GetPointer(); }
248 void SetPixelContainer(PixelContainer *container);
260 virtual void Graft(
const Self *data);
278 unsigned int GetNumberOfComponentsPerPixel()
const override;
282 void PrintSelf(std::ostream & os,
Indent indent)
const override;
285 ~
Image()
override =
default;
292 void ComputeIndexToPhysicalPointMatrices()
override;
293 using Superclass::Graft;
301 #ifndef ITK_MANUAL_INSTANTIATION
302 #include "itkImage.hxx"
const PixelContainer * GetPixelContainer() const
unsigned int ImageDimensionType
SpacePrecisionType SpacingValueType
unsigned long SizeValueType
virtual TPixel * GetBufferPointer()
An image region represents a structured region of data.
TPixel & GetPixel(const IndexType &index)
Get a reference to a pixel (e.g. for editing).
const TPixel & GetPixel(const IndexType &index) const
Get a pixel (read only version).
Implements a weak reference to an object.
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
AccessorType GetPixelAccessor()
ImageBaseType::SizeType SizeType
Provides accessor interfaces to Get pixels and is meant to be used on pointers contained within Neigh...
ImageBaseType::DirectionType DirectionType
ImageBaseType::IndexType IndexType
signed long IndexValueType
const AccessorType GetPixelAccessor() const
Represent a n-dimensional size (bounds) of a n-dimensional image.
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image...
typename SizeType::SizeValueType SizeValueType
Provides a common API for pixel accessors for Image and VectorImage.
typename OffsetType::OffsetValueType OffsetValueType
PixelContainerPointer m_Buffer
virtual const TPixel * GetBufferPointer() const
Base class for templated image classes.
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
PixelContainer * GetPixelContainer()
const TPixel & operator[](const IndexType &index) const
Access a pixel. This version can only be an rvalue.
typename PixelContainer::Pointer PixelContainerPointer
typename PixelContainer::ConstPointer PixelContainerConstPointer
Give access to partial aspects a type.
Base class for most ITK classes.
ImageBaseType::RegionType RegionType
TPixel & operator[](const IndexType &index)
Access a pixel. This version can be an lvalue.
typename IndexType::IndexValueType IndexValueType
signed long OffsetValueType
void SetPixel(const IndexType &index, const TPixel &value)
Set a pixel value.
Base class for all data objects in ITK.
Templated n-dimensional image class.
Defines an itk::Image front-end to a standard C-array.
TNode * InternalPixelType