18#ifndef itkVectorImage_h
19#define itkVectorImage_h
80template <
typename TPixel,
unsigned int VImageDimension = 3>
131 static constexpr unsigned int ImageDimension = VImageDimension;
138 using typename Superclass::OffsetType;
155 using typename Superclass::SpacingType;
186 template <
typename UPixelType,
unsigned int VUImageDimension = VImageDimension>
193 template <
typename UElementType,
unsigned int VUImageDimension>
200 template <
typename UPixelType,
unsigned int VUImageDimension = VImageDimension>
206 Allocate(
bool UseValueInitialization =
false)
override;
226 OffsetValueType offset = m_VectorLength * this->FastComputeOffset(index);
230 (*m_Buffer)[offset + i] = value[i];
242 OffsetValueType offset = m_VectorLength * this->FastComputeOffset(index);
246 return PixelType(&((*m_Buffer)[offset]), m_VectorLength);
261 OffsetValueType offset = m_VectorLength * this->FastComputeOffset(index);
265 return PixelType(&((*m_Buffer)[offset]), m_VectorLength);
290 return m_Buffer ? m_Buffer->GetBufferPointer() :
nullptr;
292 const InternalPixelType *
295 return m_Buffer ? m_Buffer->GetBufferPointer() :
nullptr;
303 return m_Buffer.GetPointer();
307 const PixelContainer *
310 return m_Buffer.GetPointer();
346 NeighborhoodAccessorFunctorType
353 const NeighborhoodAccessorFunctorType
379 using Superclass::Graft;
390#ifndef ITK_MANUAL_INSTANTIATION
391# include "itkVectorImage.hxx"
Base class for all data objects in ITK.
This class provides a common API for pixel accessors for Image and VectorImage. (between the DefaultV...
Give access to partial aspects of a type.
Base class for templated image classes.
typename OffsetType::OffsetValueType OffsetValueType
Defines an itk::Image front-end to a standard C-array.
Control indentation during Print() invocation.
Base class for most ITK classes.
Provides accessor interfaces to Access pixels and is meant to be used on pointers to pixels held by t...
Templated n-dimensional vector image class.
void Initialize() override
typename PixelContainer::ConstPointer PixelContainerConstPointer
const AccessorType GetPixelAccessor() const
typename Rebind< UPixelType, VUImageDimension >::Type RebindImageType
const PixelType operator[](const IndexType &index) const
Access a pixel.
unsigned int VectorLengthType
InternalPixelType IOPixelType
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
void SetPixelContainer(PixelContainer *container)
virtual void Graft(const Self *image)
void Graft(const DataObject *data) override
void FillBuffer(const PixelType &value)
const InternalPixelType * GetBufferPointer() const
PixelContainer * GetPixelContainer()
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
void SetNumberOfComponentsPerPixel(unsigned int n) override
unsigned int GetNumberOfComponentsPerPixel() const override
PixelType GetPixel(const IndexType &index)
Get a "reference" to a pixel. This result cannot be used as an lvalue because the pixel is converted ...
~VectorImage() override=default
void Allocate(bool UseValueInitialization=false) override
typename PixelContainer::Pointer PixelContainerPointer
const PixelType GetPixel(const IndexType &index) const
Get a pixel (read only version).
void SetPixel(const IndexType &index, const PixelType &value)
Set a pixel value.
AccessorType GetPixelAccessor()
PixelType operator[](const IndexType &index)
Access a pixel. This result cannot be used as an lvalue because the pixel is converted on the fly to ...
const PixelContainer * GetPixelContainer() const
void PrintSelf(std::ostream &os, Indent indent) const override
InternalPixelType * GetBufferPointer()
Implements a weak reference to an object.
SmartPointer< const Self > ConstPointer
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....
A structure which enable changing any image class' pixel type to another.