51template <
typename TPixel,
unsigned int VImageDimension = 3,
typename CounterType =
unsigned short>
55 ITK_DISALLOW_COPY_AND_MOVE(
RLEImage);
81 using RLSegment = std::pair<CounterType, PixelType>;
84 using RLLine = std::vector<RLSegment>;
156 m_Buffer->SetLargestPossibleRegion(region.Slice(0));
163 m_Buffer->SetBufferedRegion(region.Slice(0));
172 m_Buffer->SetRequestedRegion(region.Slice(0));
223 typename BufferType::Pointer
230 typename BufferType::ConstPointer
237 static inline typename BufferType::IndexType
304#ifndef ITK_MANUAL_INSTANTIATION
305# include "itkRLEImage.hxx"
Base class for templated image classes.
Vector< SpacingValueType, VImageDimension > SpacingType
virtual void SetRequestedRegion(const RegionType ®ion)
ImageRegion< VImageDimension > RegionType
SpacePrecisionType SpacingValueType
virtual void SetBufferedRegion(const RegionType ®ion)
Index< VImageDimension > IndexType
Offset< VImageDimension > OffsetType
typename OffsetType::OffsetValueType OffsetValueType
typename IndexType::IndexValueType IndexValueType
virtual void ComputeIndexToPhysicalPointMatrices()
Matrix< SpacePrecisionType, VImageDimension, VImageDimension > DirectionType
Size< VImageDimension > SizeType
Point< PointValueType, VImageDimension > PointType
virtual void SetLargestPossibleRegion(const RegionType ®ion)
void Initialize() override
typename SizeType::SizeValueType SizeValueType
Templated n-dimensional image class.
Control indentation during Print() invocation.
static constexpr unsigned int GetLength()
void Allocate(bool initialize=false) override
std::vector< RLSegment > RLLine
int SetPixel(RLLine &line, IndexValueType &segmentRemainder, SizeValueType &m_RealIndex, const TPixel &value)
typename itk::Image< RLLine, VImageDimension - 1 > BufferType
BufferType::Pointer GetBuffer()
void SetPixel(const IndexType &index, const TPixel &value)
Set a pixel value.
typename Superclass::SizeType SizeType
typename Superclass::DirectionType DirectionType
CounterType RLCounterType
typename Superclass::PointType PointType
void SetRequestedRegion(const RegionType ®ion) override
void PrintSelf(std::ostream &os, itk::Indent indent) const override
const TPixel & GetPixel(const IndexType &index) const
Get a pixel. SLOW! Better use iterators for pixel access.
BufferType::Pointer m_Buffer
void ComputeIndexToPhysicalPointMatrices() override
typename Superclass::OffsetType OffsetType
typename Superclass::RegionType RegionType
typename Superclass::SizeValueType SizeValueType
itk::SmartPointer< Self > Pointer
itk::WeakPointer< const Self > ConstWeakPointer
~RLEImage() override=default
unsigned int GetNumberOfComponentsPerPixel() const override
void SetLargestPossibleRegion(const RegionType ®ion) override
itk::ImageBase< VImageDimension > Superclass
BufferType::ConstPointer GetBuffer() const
void CleanUpLine(RLLine &line) const
typename Superclass::OffsetValueType OffsetValueType
void Initialize() override
static BufferType::IndexType truncateIndex(const IndexType &index)
itk::SmartPointer< const Self > ConstPointer
void FillBuffer(const TPixel &value)
const TPixel & operator[](const IndexType &index) const
Access a pixel. Chaning it changes the whole RLE segment! */ TPixel & operator[](const IndexType & i...
typename Superclass::IndexType IndexType
typename Superclass::SpacingValueType SpacingValueType
typename Superclass::IndexValueType IndexValueType
typename Superclass::SpacingType SpacingType
bool GetOnTheFlyCleanup() const
static constexpr unsigned int ImageDimension
void SetOnTheFlyCleanup(bool value)
void SetBufferedRegion(const RegionType ®ion) override
std::pair< CounterType, PixelType > RLSegment
Implements transparent reference counting.
Implements a weak reference to an object.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....