|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkVectorImage_h
19 #define itkVectorImage_h
80 template <
typename TPixel,
unsigned int VImageDimension = 3>
81 class ITK_TEMPLATE_EXPORT VectorImage :
public ImageBase<VImageDimension>
84 ITK_DISALLOW_COPY_AND_MOVE(VectorImage);
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;
211 Initialize()
override;
226 const OffsetValueType offset = m_VectorLength * this->FastComputeOffset(index);
230 (*m_Buffer)[offset + i] = value[i];
242 const OffsetValueType offset = m_VectorLength * this->FastComputeOffset(index);
246 return PixelType(&((*m_Buffer)[offset]), m_VectorLength);
261 const OffsetValueType offset = m_VectorLength * this->FastComputeOffset(index);
265 return PixelType(&((*m_Buffer)[offset]), m_VectorLength);
280 return this->GetPixel(index);
290 return this->GetPixel(index);
298 return m_Buffer ? m_Buffer->GetBufferPointer() :
nullptr;
300 const InternalPixelType *
303 return m_Buffer ? m_Buffer->GetBufferPointer() :
nullptr;
311 return m_Buffer.GetPointer();
315 const PixelContainer *
318 return m_Buffer.GetPointer();
324 SetPixelContainer(PixelContainer * container);
337 Graft(
const Self * image);
354 NeighborhoodAccessorFunctorType
361 const NeighborhoodAccessorFunctorType
368 itkSetMacro(VectorLength, VectorLengthType);
369 itkGetConstReferenceMacro(VectorLength, VectorLengthType);
374 GetNumberOfComponentsPerPixel()
const override;
377 SetNumberOfComponentsPerPixel(
unsigned int n)
override;
382 PrintSelf(std::ostream & os,
Indent indent)
const override;
387 using Superclass::Graft;
398 #ifndef ITK_MANUAL_INSTANTIATION
399 # include "itkVectorImage.hxx"
typename OffsetType::OffsetValueType OffsetValueType
SmartPointer< Self > Pointer
void SetPixel(const IndexType &index, const PixelType &value)
Set a pixel value.
SmartPointer< const Self > ConstPointer
ImageBaseType::DirectionType DirectionType
A structure which enable changing any image class' pixel type to another.
const PixelType GetPixel(const IndexType &index) const
Get a pixel (read only version).
Base class for templated image classes.
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
Templated n-dimensional vector image class.
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
typename Rebind< UPixelType, VUImageDimension >::Type RebindImageType
class ITK_TEMPLATE_EXPORT ImageBase
Control indentation during Print() invocation.
const AccessorType GetPixelAccessor() const
const InternalPixelType * GetBufferPointer() const
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
PixelContainer * GetPixelContainer()
TPixelType InternalPixelType
This class provides a common API for pixel accessors for Image and VectorImage. (between the DefaultV...
ImageBaseType::IndexType IndexType
typename PixelContainer::Pointer PixelContainerPointer
Give access to partial aspects of a type.
InternalPixelType * GetBufferPointer()
AccessorType GetPixelAccessor()
const PixelType operator[](const IndexType &index) const
Access a pixel.
ImageBaseType::RegionType RegionType
typename PixelContainer::ConstPointer PixelContainerConstPointer
Defines an itk::Image front-end to a standard C-array.
Represents an array whose length can be defined at run-time.
Provides accessor interfaces to Access pixels and is meant to be used on pointers to pixels held by t...
const PixelContainer * GetPixelContainer() const
Implements a weak reference to an object.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Base class for most ITK classes.
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 ...
InternalPixelType IOPixelType
unsigned int VectorLengthType
Base class for all data objects in ITK.
PixelType GetPixel(const IndexType &index)
Get a "reference" to a pixel. This result cannot be used as an lvalue because the pixel is converted ...