18 #ifndef itkVectorImage_h
19 #define itkVectorImage_h
80 template<
typename TPixel,
unsigned int VImageDimension = 3 >
81 class ITK_TEMPLATE_EXPORT VectorImage:
131 itkStaticConstMacro(ImageDimension,
unsigned int, VImageDimension);
185 template <
typename UPixelType,
unsigned int NUImageDimension = VImageDimension>
192 template <
typename UElementType,
unsigned int NUImageDimension>
201 virtual void Allocate(
bool UseDefaultConstructor =
false) ITK_OVERRIDE;
205 virtual
void Initialize() ITK_OVERRIDE;
209 void FillBuffer(const PixelType & value);
218 OffsetValueType offset = m_VectorLength * this->FastComputeOffset(index);
222 ( *m_Buffer )[offset + i] = value[i];
233 OffsetValueType offset = m_VectorLength * this->FastComputeOffset(index);
237 return PixelType(&( ( *m_Buffer )[offset] ), m_VectorLength);
251 OffsetValueType offset = m_VectorLength * this->FastComputeOffset(index);
255 return PixelType(&( ( *m_Buffer )[offset] ), m_VectorLength);
279 return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR;
283 return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR;
295 void SetPixelContainer(PixelContainer *container);
307 virtual void Graft(
const Self *data);
328 itkSetMacro(VectorLength, VectorLengthType);
329 itkGetConstReferenceMacro(VectorLength, VectorLengthType);
333 virtual unsigned int GetNumberOfComponentsPerPixel() const ITK_OVERRIDE;
335 virtual
void SetNumberOfComponentsPerPixel(
unsigned int n) ITK_OVERRIDE;
339 void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
341 virtual ~VectorImage() ITK_OVERRIDE {}
342 virtual void Graft(
const DataObject *data) ITK_OVERRIDE;
343 using Superclass::Graft;
355 #ifndef ITK_MANUAL_INSTANTIATION
356 #include "itkVectorImage.hxx"
const InternalPixelType * GetBufferPointer() const
Superclass::OffsetValueType OffsetValueType
ImportImageContainer< SizeValueType, InternalPixelType > PixelContainer
PixelContainer::Pointer PixelContainerPointer
signed long OffsetValueType
signed long IndexValueType
PixelContainer * GetPixelContainer()
PixelType GetPixel(const IndexType &index)
Get a "reference" to a pixel. This result cannot be used as an lvalue because the pixel is converted ...
Superclass::IndexType IndexType
Superclass::SizeType SizeType
Templated n-dimensional vector image class.
itk::VectorImage< UPixelType, NUImageDimension > Type
SmartPointer< const Self > ConstPointer
AccessorType GetPixelAccessor(void)
Implements a weak reference to an object.
A structure which enable changing any image class' pixel type to another.
Superclass::OffsetType OffsetType
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
Superclass::DirectionType DirectionType
Give access to partial aspects of a type.
ImageBaseType::DirectionType DirectionType
This class provides a common API for pixel accessors for Image and VectorImage. (between the DefaultV...
Superclass::PointType PointType
Represents an array whose length can be defined at run-time.
ImageBaseType::PointType PointType
InternalPixelType * GetBufferPointer()
DefaultVectorPixelAccessor< InternalPixelType > AccessorType
Superclass::SpacingType SpacingType
VariableLengthVector< TPixel > PixelType
InternalPixelType IOPixelType
OffsetType::OffsetValueType OffsetValueType
class ITK_TEMPLATE_EXPORT ImageBase
VectorImageNeighborhoodAccessorFunctor< Self > NeighborhoodAccessorFunctorType
unsigned int VectorLengthType
WeakPointer< const Self > ConstWeakPointer
Base class for templated image classes.
const AccessorType GetPixelAccessor(void) const
Superclass::RegionType RegionType
VectorLengthType m_VectorLength
const PixelType GetPixel(const IndexType &index) const
Get a pixel (read only version).
Control indentation during Print() invocation.
ImageBaseType::SizeType SizeType
PixelContainerPointer m_Buffer
const PixelType operator[](const IndexType &index) const
Access a pixel.
Superclass::IndexValueType IndexValueType
DefaultVectorPixelAccessorFunctor< Self > AccessorFunctorType
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 ...
PixelContainer::ConstPointer PixelContainerConstPointer
SmartPointer< Self > Pointer
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
const PixelContainer * GetPixelContainer() const
Base class for all data objects in ITK.
Provides accessor interfaces to Access pixels and is meant to be used on pointers to pixels held by t...
ImageBase< VImageDimension > Superclass
ImageBaseType::IndexType IndexType
Defines an itk::Image front-end to a standard C-array.