ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::RLEImage< TPixel, VImageDimension, CounterType > Class Template Reference

#include <itkRLEImage.h>

Detailed Description

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
class itk::RLEImage< TPixel, VImageDimension, CounterType >

Run-Length Encoded image. It saves memory for label images at the expense of processing times. Unsuitable for ordinary images (in which case it is counterproductive).

Details
BufferedRegion must include complete run-length lines (along X index axis). BufferedRegion can be smaller than LargestPossibleRegion along other axes.

It is best if pixel type and counter type have the same byte size (for memory alignment purposes).

OnTheFlyCleanup
Should same-valued segments be merged on the fly? On the fly merging usually provides better performance. Default: On.

Acknowledgement: This work is supported by NIH grant R01 EB014346, "Continued development and maintenance of the ITK-SNAP 3D image segmentation software."

Definition at line 52 of file itkRLEImage.h.

+ Inheritance diagram for itk::RLEImage< TPixel, VImageDimension, CounterType >:
+ Collaboration diagram for itk::RLEImage< TPixel, VImageDimension, CounterType >:

Public Types

using BufferType = typename itk::Image<RLLine, VImageDimension - 1>
 
using ConstPointer = itk::SmartPointer<const Self>
 
using ConstWeakPointer = itk::WeakPointer<const Self>
 
using DirectionType = typename Superclass::DirectionType
 
using IndexType = typename Superclass::IndexType
 
using IndexValueType = typename Superclass::IndexValueType
 
using InternalPixelType = RLLine
 
using OffsetType = typename Superclass::OffsetType
 
using OffsetValueType = typename Superclass::OffsetValueType
 
using PixelType = TPixel
 
using Pointer = itk::SmartPointer<Self>
 
using PointType = typename Superclass::PointType
 
using RegionType = typename Superclass::RegionType
 
using RLCounterType = CounterType
 
using RLLine = std::vector<RLSegment>
 
using RLSegment = std::pair<CounterType, PixelType>
 
using Self = RLEImage
 
using SizeType = typename Superclass::SizeType
 
using SizeValueType = typename Superclass::SizeValueType
 
using SpacingType = typename Superclass::SpacingType
 
using SpacingValueType = typename Superclass::SpacingValueType
 
using Superclass = itk::ImageBase<VImageDimension>
 
using ValueType = TPixel
 
- Public Types inherited from itk::ImageBase< 3 >
using ConstPointer
 
using DirectionType
 
using ImageDimensionType
 
using IndexType
 
using IndexValueType
 
using OffsetType
 
using OffsetValueType
 
using Pointer
 
using PointType
 
using PointValueType
 
using RegionType
 
using Self
 
using SizeType
 
using SizeValueType
 
using SpacingType
 
using SpacingValueType
 
using Superclass
 
- Public Types inherited from itk::DataObject
using ConstPointer = SmartPointer<const Self>
 
using DataObjectIdentifierType = std::string
 
using DataObjectPointerArraySizeType = std::vector<Pointer>::size_type
 
using Pointer = SmartPointer<Self>
 
using Self = DataObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = LightObject
 

Public Member Functions

void Allocate (bool initialize=false) override
 
void CleanUp () const
 
virtual::itk::LightObject::Pointer CreateAnother () const
 
void FillBuffer (const TPixel &value)
 
BufferType::Pointer GetBuffer ()
 
BufferType::ConstPointer GetBuffer () const
 
virtual const char * GetNameOfClass () const
 
unsigned int GetNumberOfComponentsPerPixel () const override
 
bool GetOnTheFlyCleanup () const
 
const TPixel & GetPixel (const IndexType &index) const
 
void Initialize () override
 
const TPixel & operator[] (const IndexType &index) const
 
void SetBufferedRegion (const RegionType &region) override
 
void SetLargestPossibleRegion (const RegionType &region) override
 
void SetOnTheFlyCleanup (bool value)
 
void SetPixel (const IndexType &index, const TPixel &value)
 
int SetPixel (RLLine &line, IndexValueType &segmentRemainder, SizeValueType &m_RealIndex, const TPixel &value)
 
void SetRequestedRegion (const RegionType &region) override
 
- Public Member Functions inherited from itk::ImageBase< 3 >
void AllocateInitialized ()
 
void AllocateInitialized ()
 
IndexType ComputeIndex (OffsetValueType offset) const
 
IndexType ComputeIndex (OffsetValueType offset) const
 
OffsetValueType ComputeOffset (const IndexType &ind) const
 
OffsetValueType ComputeOffset (const IndexType &ind) const
 
void CopyInformation (const DataObject *data) override
 
void CopyInformation (const DataObject *data) override
 
virtual const RegionType & GetBufferedRegion () const
 
virtual const RegionType & GetBufferedRegion () const
 
virtual const DirectionType & GetInverseDirection () const
 
virtual const DirectionType & GetInverseDirection () const
 
virtual const RegionType & GetLargestPossibleRegion () const
 
virtual const RegionType & GetLargestPossibleRegion () const
 
const OffsetValueType * GetOffsetTable () const
 
const OffsetValueType * GetOffsetTable () const
 
virtual const RegionType & GetRequestedRegion () const
 
virtual const RegionType & GetRequestedRegion () const
 
virtual void Graft (const Self *image)
 
virtual void Graft (const Self *image)
 
bool IsCongruentImageGeometry (const ImageBase *otherImage, double coordinateTolerance, double directionTolerance) const
 
bool IsCongruentImageGeometry (const ImageBase *otherImage, double coordinateTolerance, double directionTolerance) const
 
bool IsSameImageGeometryAs (const ImageBase *otherImage, double coordinateTolerance=DefaultImageCoordinateTolerance, double directionTolerance=DefaultImageDirectionTolerance) const
 
bool IsSameImageGeometryAs (const ImageBase *otherImage, double coordinateTolerance=DefaultImageCoordinateTolerance, double directionTolerance=DefaultImageDirectionTolerance) const
 
 itkVirtualGetConstReferenceMacro (Direction, DirectionType)
 
 itkVirtualGetConstReferenceMacro (Direction, DirectionType)
 
 itkVirtualGetConstReferenceMacro (Origin, PointType)
 
 itkVirtualGetConstReferenceMacro (Origin, PointType)
 
 itkVirtualGetConstReferenceMacro (Spacing, SpacingType)
 
 itkVirtualGetConstReferenceMacro (Spacing, SpacingType)
 
bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 
bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 
virtual void SetDirection (const DirectionType &direction)
 
virtual void SetDirection (const DirectionType &direction)
 
void SetRequestedRegion (const DataObject *data) override
 
void SetRequestedRegion (const DataObject *data) override
 
void SetRequestedRegionToLargestPossibleRegion () override
 
void SetRequestedRegionToLargestPossibleRegion () override
 
Point< TCoordinate, VImageDimension > TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index) const
 
Point< TCoordinate, VImageDimension > TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index) const
 
void TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index, Point< TCoordinate, VImageDimension > &point) const
 
void TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index, Point< TCoordinate, VImageDimension > &point) const
 
Point< TCoordinate, VImageDimension > TransformIndexToPhysicalPoint (const IndexType &index) const
 
Point< TCoordinate, VImageDimension > TransformIndexToPhysicalPoint (const IndexType &index) const
 
void TransformIndexToPhysicalPoint (const IndexType &index, Point< TCoordinate, VImageDimension > &point) const
 
void TransformIndexToPhysicalPoint (const IndexType &index, Point< TCoordinate, VImageDimension > &point) const
 
void TransformLocalVectorToPhysicalVector (const FixedArray< TCoordinate, VImageDimension > &inputGradient, FixedArray< TCoordinate, VImageDimension > &outputGradient) const
 
void TransformLocalVectorToPhysicalVector (const FixedArray< TCoordinate, VImageDimension > &inputGradient, FixedArray< TCoordinate, VImageDimension > &outputGradient) const
 
TVector TransformLocalVectorToPhysicalVector (const TVector &inputGradient) const
 
TVector TransformLocalVectorToPhysicalVector (const TVector &inputGradient) const
 
ContinuousIndex< TIndexRep, VImageDimension > TransformPhysicalPointToContinuousIndex (const Point< TCoordinate, VImageDimension > &point) const
 
ContinuousIndex< TIndexRep, VImageDimension > TransformPhysicalPointToContinuousIndex (const Point< TCoordinate, VImageDimension > &point) const
 
bool TransformPhysicalPointToContinuousIndex (const Point< TCoordinate, VImageDimension > &point, ContinuousIndex< TIndexRep, VImageDimension > &index) const
 
bool TransformPhysicalPointToContinuousIndex (const Point< TCoordinate, VImageDimension > &point, ContinuousIndex< TIndexRep, VImageDimension > &index) const
 
IndexType TransformPhysicalPointToIndex (const Point< TCoordinate, VImageDimension > &point) const
 
IndexType TransformPhysicalPointToIndex (const Point< TCoordinate, VImageDimension > &point) const
 
bool TransformPhysicalPointToIndex (const Point< TCoordinate, VImageDimension > &point, IndexType &index) const
 
bool TransformPhysicalPointToIndex (const Point< TCoordinate, VImageDimension > &point, IndexType &index) const
 
void TransformPhysicalVectorToLocalVector (const FixedArray< TCoordinate, VImageDimension > &inputGradient, FixedArray< TCoordinate, VImageDimension > &outputGradient) const
 
void TransformPhysicalVectorToLocalVector (const FixedArray< TCoordinate, VImageDimension > &inputGradient, FixedArray< TCoordinate, VImageDimension > &outputGradient) const
 
TVector TransformPhysicalVectorToLocalVector (const TVector &inputGradient) const
 
TVector TransformPhysicalVectorToLocalVector (const TVector &inputGradient) const
 
void UpdateOutputData () override
 
void UpdateOutputData () override
 
void UpdateOutputInformation () override
 
void UpdateOutputInformation () override
 
bool VerifyRequestedRegion () override
 
bool VerifyRequestedRegion () override
 
 itkVirtualSetMacro (Origin, PointType)
 
virtual void SetOrigin (const double origin[VImageDimension])
 
virtual void SetOrigin (const float origin[VImageDimension])
 
 itkVirtualSetMacro (Origin, PointType)
 
virtual void SetOrigin (const double origin[VImageDimension])
 
virtual void SetOrigin (const float origin[VImageDimension])
 
virtual void SetRegions (const RegionType &region)
 
virtual void SetRegions (const SizeType &size)
 
virtual void SetRegions (const RegionType &region)
 
virtual void SetRegions (const SizeType &size)
 
virtual void SetSpacing (const SpacingType &spacing)
 
virtual void SetSpacing (const double spacing[VImageDimension])
 
virtual void SetSpacing (const float spacing[VImageDimension])
 
virtual void SetSpacing (const SpacingType &spacing)
 
virtual void SetSpacing (const double spacing[VImageDimension])
 
virtual void SetSpacing (const float spacing[VImageDimension])
 
virtual void SetNumberOfComponentsPerPixel (unsigned int)
 
virtual void SetNumberOfComponentsPerPixel (unsigned int)
 
- Public Member Functions inherited from itk::DataObject
virtual void DataHasBeenGenerated ()
 
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointer< ProcessObject > GetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierType & GetSourceOutputName () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void PrepareForNewData ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
void SetReleaseDataFlag (bool flag)
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
void UpdateSource () const
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeType & GetPipelineMTime () const
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStamp & GetRealTimeStamp () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
Command * GetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionary & GetMetaDataDictionary ()
 
const MetaDataDictionary & GetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStamp & GetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
static BufferType::IndexType truncateIndex (const IndexType &index)
 
- Static Public Member Functions inherited from itk::ImageBase< 3 >
static constexpr unsigned int GetImageDimension ()
 
static constexpr unsigned int GetImageDimension ()
 
static Pointer New ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
 
static void GlobalReleaseDataFlagOff ()
 
static void GlobalReleaseDataFlagOn ()
 
static Pointer New ()
 
static void SetGlobalReleaseDataFlag (bool val)
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int ImageDimension = VImageDimension
 
- Static Public Attributes inherited from itk::ImageBase< 3 >
static constexpr ImageDimensionType ImageDimension
 
static constexpr ImageDimensionType ImageDimension
 

Protected Member Functions

void CleanUpLine (RLLine &line) const
 
void ComputeIndexToPhysicalPointMatrices () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 RLEImage ()
 
 ~RLEImage () override=default
 
- Protected Member Functions inherited from itk::ImageBase< 3 >
void ComputeOffsetTable ()
 
void ComputeOffsetTable ()
 
IndexType FastComputeIndex (OffsetValueType offset) const
 
IndexType FastComputeIndex (OffsetValueType offset) const
 
OffsetValueType FastComputeOffset (const IndexType &ind) const
 
OffsetValueType FastComputeOffset (const IndexType &ind) const
 
void Graft (const DataObject *data) override
 
void Graft (const DataObject *data) override
 
 ImageBase ()=default
 
 ImageBase ()=default
 
virtual void InitializeBufferedRegion ()
 
virtual void InitializeBufferedRegion ()
 
 ~ImageBase () override=default
 
 ~ImageBase () override=default
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
virtual void PropagateResetPipeline ()
 
 ~DataObject () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

BufferType::Pointer m_Buffer
 
bool m_OnTheFlyCleanup { true }
 

Additional Inherited Members

- Protected Attributes inherited from itk::ImageBase< 3 >
SpacingType m_Spacing
 
PointType m_Origin
 
DirectionType m_Direction
 
DirectionType m_InverseDirection
 
SpacingType m_Spacing
 
PointType m_Origin
 
DirectionType m_Direction
 
DirectionType m_InverseDirection
 
DirectionType m_IndexToPhysicalPoint
 
DirectionType m_PhysicalPointToIndex
 
DirectionType m_IndexToPhysicalPoint
 
DirectionType m_PhysicalPointToIndex
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ BufferType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::BufferType = typename itk::Image<RLLine, VImageDimension - 1>

Typedef for the internally used buffer.

Definition at line 220 of file itkRLEImage.h.

◆ ConstPointer

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::ConstPointer = itk::SmartPointer<const Self>

Definition at line 61 of file itkRLEImage.h.

◆ ConstWeakPointer

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::ConstWeakPointer = itk::WeakPointer<const Self>

Definition at line 62 of file itkRLEImage.h.

◆ DirectionType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::DirectionType = typename Superclass::DirectionType

Direction type alias support. A matrix of direction cosines.

Definition at line 112 of file itkRLEImage.h.

◆ IndexType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::IndexType = typename Superclass::IndexType

Index type alias support. An index is used to access pixel values.

Definition at line 101 of file itkRLEImage.h.

◆ IndexValueType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::IndexValueType = typename Superclass::IndexValueType

Definition at line 102 of file itkRLEImage.h.

◆ InternalPixelType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::InternalPixelType = RLLine

Internal Pixel representation. Used to maintain a uniform API with Image Adaptors and allow to keep a particular internal representation of data while showing a different external representation.

Definition at line 90 of file itkRLEImage.h.

◆ OffsetType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::OffsetType = typename Superclass::OffsetType

Offset type alias support. An offset is used to access pixel values.

Definition at line 105 of file itkRLEImage.h.

◆ OffsetValueType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::OffsetValueType = typename Superclass::OffsetValueType

Offset type alias (relative position between indices)

Definition at line 128 of file itkRLEImage.h.

◆ PixelType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::PixelType = TPixel

Pixel type alias support. Used to declare pixel type in filters or other operations.

Definition at line 72 of file itkRLEImage.h.

◆ Pointer

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::Pointer = itk::SmartPointer<Self>

Definition at line 60 of file itkRLEImage.h.

◆ PointType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::PointType = typename Superclass::PointType

Origin type alias support. The origin is the geometric coordinates of the index (0,0).

Definition at line 125 of file itkRLEImage.h.

◆ RegionType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::RegionType = typename Superclass::RegionType

Region type alias support. A region is used to specify a subset of an image.

Definition at line 116 of file itkRLEImage.h.

◆ RLCounterType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::RLCounterType = CounterType

Definition at line 74 of file itkRLEImage.h.

◆ RLLine

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::RLLine = std::vector<RLSegment>

A Run-Length encoded line of pixels.

Definition at line 84 of file itkRLEImage.h.

◆ RLSegment

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::RLSegment = std::pair<CounterType, PixelType>

First element is count of repetitions, second element is the pixel value.

Definition at line 81 of file itkRLEImage.h.

◆ Self

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::Self = RLEImage

Standard class type alias

Definition at line 58 of file itkRLEImage.h.

◆ SizeType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::SizeType = typename Superclass::SizeType

Size type alias support. A size is used to define region bounds.

Definition at line 108 of file itkRLEImage.h.

◆ SizeValueType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::SizeValueType = typename Superclass::SizeValueType

Definition at line 109 of file itkRLEImage.h.

◆ SpacingType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::SpacingType = typename Superclass::SpacingType

Spacing type alias support. Spacing holds the size of a pixel. The spacing is the geometric distance between image samples.

Definition at line 120 of file itkRLEImage.h.

◆ SpacingValueType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::SpacingValueType = typename Superclass::SpacingValueType

Definition at line 121 of file itkRLEImage.h.

◆ Superclass

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::Superclass = itk::ImageBase<VImageDimension>

Definition at line 59 of file itkRLEImage.h.

◆ ValueType

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
using itk::RLEImage< TPixel, VImageDimension, CounterType >::ValueType = TPixel

Typedef alias for PixelType

Definition at line 77 of file itkRLEImage.h.

Constructor & Destructor Documentation

◆ RLEImage()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
itk::RLEImage< TPixel, VImageDimension, CounterType >::RLEImage ( )
inlineprotected

Definition at line 270 of file itkRLEImage.h.

◆ ~RLEImage()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
itk::RLEImage< TPixel, VImageDimension, CounterType >::~RLEImage ( )
overrideprotecteddefault

Member Function Documentation

◆ Allocate()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::Allocate ( bool initialize = false)
overridevirtual

Allocate the image memory. The size of the image must already be set, e.g. by calling SetRegions(). Pixel values are initialized using default constructor.

Reimplemented from itk::ImageBase< 3 >.

◆ CleanUp()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::CleanUp ( ) const

Merges adjacent segments with duplicate values. Automatically called when turning on OnTheFlyCleanup.

Referenced by SetOnTheFlyCleanup().

◆ CleanUpLine()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::CleanUpLine ( RLLine & line) const
protected

Merges adjacent segments with duplicate values in a single line.

◆ ComputeIndexToPhysicalPointMatrices()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::ComputeIndexToPhysicalPointMatrices ( )
inlineoverrideprotectedvirtual

Compute helper matrices used to transform Index coordinates to PhysicalPoint coordinates and back. This method is virtual and will be overloaded in derived classes in order to provide backward compatibility behavior in classes that did not used to take image orientation into account.

Reimplemented from itk::ImageBase< 3 >.

Definition at line 287 of file itkRLEImage.h.

◆ CreateAnother()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
virtual::itk::LightObject::Pointer itk::RLEImage< TPixel, VImageDimension, CounterType >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::ImageBase< 3 >.

◆ FillBuffer()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::FillBuffer ( const TPixel & value)

Fill the image buffer with a value. Be sure to call Allocate() first.

◆ GetBuffer() [1/2]

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
BufferType::Pointer itk::RLEImage< TPixel, VImageDimension, CounterType >::GetBuffer ( )
inline

We need to allow itk-style iterators to be constructed.

Definition at line 224 of file itkRLEImage.h.

◆ GetBuffer() [2/2]

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
BufferType::ConstPointer itk::RLEImage< TPixel, VImageDimension, CounterType >::GetBuffer ( ) const
inline

We need to allow itk-style const iterators to be constructed.

Definition at line 231 of file itkRLEImage.h.

◆ GetNameOfClass()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
virtual const char * itk::RLEImage< TPixel, VImageDimension, CounterType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ImageBase< 3 >.

◆ GetNumberOfComponentsPerPixel()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
unsigned int itk::RLEImage< TPixel, VImageDimension, CounterType >::GetNumberOfComponentsPerPixel ( ) const
inlineoverridevirtual

INTERNAL This method is used internally by filters to copy meta-data from the output to the input. Users should not have a need to use this method.

Filters that override the ProcessObject's GenerateOutputInformation() should generally have the following line if they want to propagate meta- data for both Image and VectorImage

outputImage->SetNumberOfComponentsPerPixel(
inputImage->GetNumberOfComponentsPerPixel() )
See also
ImageBase, VectorImage

Returns/Sets the number of components in the image. Note that in the ImageBase implementation, this always returns 1. Image returns the

returned from NumericTraits for the pixel type, and VectorImage

returns the vector length set by the user.

Reimplemented from itk::ImageBase< 3 >.

Definition at line 212 of file itkRLEImage.h.

◆ GetOnTheFlyCleanup()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
bool itk::RLEImage< TPixel, VImageDimension, CounterType >::GetOnTheFlyCleanup ( ) const
inline

Should same-valued segments be merged on the fly? On the fly merging usually provides better performance.

Definition at line 248 of file itkRLEImage.h.

◆ GetPixel()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
const TPixel & itk::RLEImage< TPixel, VImageDimension, CounterType >::GetPixel ( const IndexType & index) const

Get a pixel. SLOW! Better use iterators for pixel access.

Referenced by operator[]().

◆ Initialize()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::Initialize ( )
inlineoverridevirtual

Restore the data object to its initial state. This means releasing memory.

Reimplemented from itk::ImageBase< 3 >.

Definition at line 139 of file itkRLEImage.h.

◆ New()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
static Pointer itk::RLEImage< TPixel, VImageDimension, CounterType >::New ( )
static

Method for creation through the object factory.

◆ operator[]()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
const TPixel & itk::RLEImage< TPixel, VImageDimension, CounterType >::operator[] ( const IndexType & index) const
inline

Access a pixel. Chaning it changes the whole RLE segment! *‍/ TPixel & operator[](const IndexType & index) { return this->GetPixel(index); }.

Get a reference to a pixel. Chaning it changes the whole RLE segment! *‍/ TPixel & GetPixel(const IndexType & index);

/**

/** Access a pixel. This version can only be an rvalue. SLOW -> Use iterators instead.

Definition at line 206 of file itkRLEImage.h.

◆ PrintSelf()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::PrintSelf ( std::ostream & os,
itk::Indent indent ) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::ImageBase< 3 >.

◆ SetBufferedRegion()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::SetBufferedRegion ( const RegionType & region)
inlineoverridevirtual

Set the region object that defines the size and starting index of the region of the image currently loaded in memory.

See also
ImageRegion, SetLargestPossibleRegion(), SetRequestedRegion()

Reimplemented from itk::ImageBase< 3 >.

Definition at line 160 of file itkRLEImage.h.

◆ SetLargestPossibleRegion()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::SetLargestPossibleRegion ( const RegionType & region)
inlineoverridevirtual

Set the region object that defines the size and starting index for the largest possible region this image could represent. This is used in determining how much memory would be needed to load an entire dataset. It is also used to determine boundary true conditions.

See also
ImageRegion, SetBufferedRegion(), SetRequestedRegion()

Reimplemented from itk::ImageBase< 3 >.

Definition at line 153 of file itkRLEImage.h.

◆ SetOnTheFlyCleanup()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::SetOnTheFlyCleanup ( bool value)
inline

Should same-valued segments be merged on the fly? On the fly merging usually provides better performance.

Definition at line 256 of file itkRLEImage.h.

◆ SetPixel() [1/2]

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::SetPixel ( const IndexType & index,
const TPixel & value )

Set a pixel value.

Allocate() needs to have been called first – for efficiency, this function does not check that the image has actually been allocated yet. SLOW -> Use iterators instead.

◆ SetPixel() [2/2]

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
int itk::RLEImage< TPixel, VImageDimension, CounterType >::SetPixel ( RLLine & line,
IndexValueType & segmentRemainder,
SizeValueType & m_RealIndex,
const TPixel & value )

Set a pixel value in the given line and updates segmentRemainder and m_RealIndex to refer to the same pixel. Returns difference in line length which happens due to merging or splitting segments. This method is used by iterators directly.

◆ SetRequestedRegion()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::SetRequestedRegion ( const RegionType & region)
inlineoverridevirtual

Set the region object that defines the size and starting index for the region of the image requested (i.e., the region of the image to be operated on by a filter). Setting the RequestedRegion does not cause the object to be modified. This method is called internally by the pipeline and therefore bypasses the modified time calculation.

See also
ImageRegion, SetLargestPossibleRegion(), SetBufferedRegion()

Reimplemented from itk::ImageBase< 3 >.

Definition at line 169 of file itkRLEImage.h.

◆ truncateIndex()

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
static BufferType::IndexType itk::RLEImage< TPixel, VImageDimension, CounterType >::truncateIndex ( const IndexType & index)
inlinestatic

Returns N-1-dimensional index, the remainder after 0-index is removed.

Member Data Documentation

◆ ImageDimension

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
unsigned int itk::RLEImage< TPixel, VImageDimension, CounterType >::ImageDimension = VImageDimension
staticconstexpr

Dimension of the image. This constant is used by functions that are templated over image type (as opposed to being templated over pixel type and dimension) when they need compile time access to the dimension of the image.

Definition at line 98 of file itkRLEImage.h.

◆ m_Buffer

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
BufferType::Pointer itk::RLEImage< TPixel, VImageDimension, CounterType >::m_Buffer
mutableprivate

Memory for the current buffer.

Definition at line 300 of file itkRLEImage.h.

◆ m_OnTheFlyCleanup

template<typename TPixel, unsigned int VImageDimension = 3, typename CounterType = unsigned short>
bool itk::RLEImage< TPixel, VImageDimension, CounterType >::m_OnTheFlyCleanup { true }
private

Definition at line 297 of file itkRLEImage.h.


The documentation for this class was generated from the following file: