51 template<
typename TPixel,
unsigned int VImageDimension = 3,
typename CounterType =
unsigned short >
56 ITK_DISALLOW_COPY_AND_ASSIGN(
RLEImage);
82 using RLSegment = std::pair< CounterType, PixelType >;
85 using RLLine = std::vector< RLSegment >;
135 Allocate(
bool initialize =
false )
override;
220 return itk::NumericTraits< PixelType >::GetLength( p );
227 typename BufferType::Pointer
234 typename BufferType::Pointer
309 #ifndef ITK_MANUAL_INSTANTIATION
310 #include "itkRLEImage.hxx"
313 #endif // itkRLEImage_h
void ComputeIndexToPhysicalPointMatrices() override
void SetLargestPossibleRegion(const RegionType ®ion) override
BufferType::Pointer GetBuffer() const
static BufferType::IndexType truncateIndex(const IndexType &index)
SpacePrecisionType SpacingValueType
BufferType::Pointer m_Buffer
void PrintSelf(std::ostream &os, itk::Indent indent) const override
unsigned long SizeValueType
Matrix< SpacePrecisionType, VImageDimension, VImageDimension > DirectionType
typename itk::Image< RLLine, VImageDimension-1 > BufferType
bool GetOnTheFlyCleanup() const
ImageRegion< VImageDimension > RegionType
An image region represents a structured region of data.
void SetPixel(const IndexType &index, const TPixel &value)
Set a pixel value.
const TPixel & GetPixel(const IndexType &index) const
Get a pixel. SLOW! Better use iterators for pixel access.
Implements a weak reference to an object.
BufferType::Pointer GetBuffer()
void Initialize() override
std::vector< RLSegment > RLLine
const TPixel & operator[](const IndexType &index) const
Access a pixel. Chaning it changes the whole RLE segment!
Vector< SpacingValueType, VImageDimension > SpacingType
ImageBaseType::IndexType IndexType
signed long IndexValueType
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...
unsigned int GetNumberOfComponentsPerPixel() const override
void CleanUpLine(RLLine &line) const
typename SizeType::SizeValueType SizeValueType
typename OffsetType::OffsetValueType OffsetValueType
void FillBuffer(const TPixel &value)
void SetBufferedRegion(const RegionType ®ion) override
void SetOnTheFlyCleanup(bool value)
typename Superclass::IndexType IndexType
static constexpr unsigned int ImageDimension
Offset< VImageDimension > OffsetType
Index< VImageDimension > IndexType
Point< PointValueType, VImageDimension > PointType
virtual void SetLargestPossibleRegion(const RegionType ®ion)
Base class for templated image classes.
void Initialize() override
void Allocate(bool initialize=false) override
virtual void ComputeIndexToPhysicalPointMatrices()
CounterType RLCounterType
SliceRegion Slice(const unsigned int dim) const
Control indentation during Print() invocation.
std::pair< CounterType, PixelType > RLSegment
Size< VImageDimension > SizeType
Run-Length Encoded image. It saves memory for label images at the expense of processing times...
Base class for most ITK classes.
typename IndexType::IndexValueType IndexValueType
void SetRequestedRegion(const RegionType ®ion) override
Base class for all data objects in ITK.
Templated n-dimensional image class.
virtual void SetRequestedRegion(const RegionType ®ion)
virtual void SetBufferedRegion(const RegionType ®ion)