ITK  5.0.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
itk::RLEImage< TPixel, VImageDimension, CounterType > Class Template Reference

#include <itkRLEImage.h>

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

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.

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< VImageDimension >
using ConstPointer = SmartPointer< const Self >
 
using DirectionType = Matrix< SpacePrecisionType, VImageDimension, VImageDimension >
 
using ImageDimensionType = unsigned int
 
using IndexType = Index< VImageDimension >
 
using IndexValueType = typename IndexType::IndexValueType
 
using OffsetType = Offset< VImageDimension >
 
using OffsetValueType = typename OffsetType::OffsetValueType
 
using Pointer = SmartPointer< Self >
 
using PointType = Point< PointValueType, VImageDimension >
 
using PointValueType = SpacePrecisionType
 
using RegionType = ImageRegion< VImageDimension >
 
using Self = ImageBase
 
using SizeType = Size< VImageDimension >
 
using SizeValueType = typename SizeType::SizeValueType
 
using SpacingType = Vector< SpacingValueType, VImageDimension >
 
using SpacingValueType = SpacePrecisionType
 
using Superclass = DataObject
 
- 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::Pointer GetBuffer () const
 
virtual const char * GetNameOfClass () const
 
unsigned int GetNumberOfComponentsPerPixel () const override
 
bool GetOnTheFlyCleanup () const
 
const TPixel & GetPixel (const IndexType &index) const
 
const TPixel & operator[] (const IndexType &index) const
 
void SetBufferedRegion (const RegionType &region) override
 
void SetLargestPossibleRegion (const RegionType &region) override
 
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
 
void Initialize () override
 
void SetOnTheFlyCleanup (bool value)
 
- Public Member Functions inherited from itk::ImageBase< VImageDimension >
OffsetValueType ComputeOffset (const IndexType &ind) const
 
void CopyInformation (const DataObject *data) override
 
virtual const RegionTypeGetBufferedRegion () const
 
virtual const DirectionTypeGetDirection () const
 
virtual const DirectionTypeGetInverseDirection () const
 
virtual const RegionTypeGetLargestPossibleRegion () const
 
virtual const PointTypeGetOrigin () const
 
virtual const RegionTypeGetRequestedRegion () const
 
virtual const SpacingTypeGetSpacing () const
 
virtual void Graft (const Self *data)
 
bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 
virtual void SetDirection (const DirectionType &direction)
 
virtual void SetRegions (const SizeType &size)
 
void SetRequestedRegion (const DataObject *data) override
 
void SetRequestedRegionToLargestPossibleRegion () override
 
template<typename TCoordRep >
void TransformLocalVectorToPhysicalVector (const FixedArray< TCoordRep, VImageDimension > &inputGradient, FixedArray< TCoordRep, VImageDimension > &outputGradient) const
 
template<typename TCoordRep , typename TIndexRep >
bool TransformPhysicalPointToContinuousIndex (const Point< TCoordRep, VImageDimension > &point, ContinuousIndex< TIndexRep, VImageDimension > &index) const
 
template<typename TCoordRep >
void TransformPhysicalVectorToLocalVector (const FixedArray< TCoordRep, VImageDimension > &inputGradient, FixedArray< TCoordRep, VImageDimension > &outputGradient) const
 
void UpdateOutputData () override
 
void UpdateOutputInformation () override
 
bool VerifyRequestedRegion () override
 
virtual void SetOrigin (PointType _arg)
 
virtual void SetOrigin (const double origin[VImageDimension])
 
virtual void SetOrigin (const float origin[VImageDimension])
 
virtual void SetRegions (const RegionType &region)
 
const OffsetValueTypeGetOffsetTable () const
 
IndexType ComputeIndex (OffsetValueType offset) const
 
virtual void SetSpacing (const SpacingType &spacing)
 
virtual void SetSpacing (const double spacing[VImageDimension])
 
virtual void SetSpacing (const float spacing[VImageDimension])
 
template<typename TCoordRep >
bool TransformPhysicalPointToIndex (const Point< TCoordRep, VImageDimension > &point, IndexType &index) const
 
template<typename TCoordRep , typename TIndexRep >
void TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index, Point< TCoordRep, VImageDimension > &point) const
 
template<typename TCoordRep >
void TransformIndexToPhysicalPoint (const IndexType &index, Point< TCoordRep, VImageDimension > &point) const
 
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< ProcessObjectGetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () 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 SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStampGetRealTimeStamp () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () 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)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexceptoverride
 
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
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
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< VImageDimension >
static unsigned int GetImageDimension ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
 
static void GlobalReleaseDataFlagOff ()
 
static void GlobalReleaseDataFlagOn ()
 
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 flag)
 
- 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< VImageDimension >
static constexpr ImageDimensionType ImageDimension = VImageDimension
 

Protected Member Functions

void CleanUpLine (RLLine &line) const
 
void ComputeIndexToPhysicalPointMatrices () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 RLEImage ()
 
 ~RLEImage () override
 
- Protected Member Functions inherited from itk::ImageBase< VImageDimension >
void ComputeOffsetTable ()
 
void Graft (const DataObject *data) override
 
 ImageBase ()
 
virtual void InitializeBufferedRegion ()
 
 ~ImageBase () override=default
 
OffsetValueType FastComputeOffset (const IndexType &ind) const
 
IndexType FastComputeIndex (OffsetValueType offset) const
 
- 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 &time)
 
 ~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
 

Additional Inherited Members

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

Member Typedef Documentation

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 224 of file itkRLEImage.h.

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 62 of file itkRLEImage.h.

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 63 of file itkRLEImage.h.

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 113 of file itkRLEImage.h.

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 102 of file itkRLEImage.h.

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

Definition at line 103 of file itkRLEImage.h.

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 91 of file itkRLEImage.h.

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 106 of file itkRLEImage.h.

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 129 of file itkRLEImage.h.

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 73 of file itkRLEImage.h.

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

Definition at line 61 of file itkRLEImage.h.

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 126 of file itkRLEImage.h.

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 117 of file itkRLEImage.h.

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

Definition at line 75 of file itkRLEImage.h.

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 85 of file itkRLEImage.h.

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 82 of file itkRLEImage.h.

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 59 of file itkRLEImage.h.

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 109 of file itkRLEImage.h.

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

Definition at line 110 of file itkRLEImage.h.

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 121 of file itkRLEImage.h.

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

Definition at line 122 of file itkRLEImage.h.

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

Definition at line 60 of file itkRLEImage.h.

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 78 of file itkRLEImage.h.

Constructor & Destructor Documentation

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

Definition at line 285 of file itkRLEImage.h.

Member Function Documentation

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< VImageDimension >.

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 itk::RLEImage< TPixel, VImageDimension, CounterType >::SetOnTheFlyCleanup().

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.

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< VImageDimension >.

Definition at line 292 of file itkRLEImage.h.

References itk::ImageBase< VImageDimension >::ComputeIndexToPhysicalPointMatrices().

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< VImageDimension >.

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.

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 228 of file itkRLEImage.h.

References itk::RLEImage< TPixel, VImageDimension, CounterType >::m_Buffer.

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

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

Definition at line 235 of file itkRLEImage.h.

References itk::RLEImage< TPixel, VImageDimension, CounterType >::m_Buffer.

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< VImageDimension >.

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< VImageDimension >.

Definition at line 214 of file itkRLEImage.h.

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 252 of file itkRLEImage.h.

References itk::RLEImage< TPixel, VImageDimension, CounterType >::m_OnTheFlyCleanup.

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 itk::RLEImage< TPixel, VImageDimension, CounterType >::operator[]().

template<typename TPixel , unsigned int VImageDimension = 3, typename CounterType = unsigned short>
void itk::RLEImage< TPixel, VImageDimension, CounterType >::Initialize ( void  )
inlineoverridevirtual
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.

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!

Get a reference to a pixel. Chaning it changes the whole RLE segment!Access a pixel. This version can only be an rvalue. SLOW -> Use iterators instead.

Definition at line 208 of file itkRLEImage.h.

References itk::RLEImage< TPixel, VImageDimension, CounterType >::GetPixel().

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< VImageDimension >.

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< VImageDimension >.

Definition at line 162 of file itkRLEImage.h.

References itk::RLEImage< TPixel, VImageDimension, CounterType >::m_Buffer, itk::ImageBase< VImageDimension >::SetBufferedRegion(), and itk::ImageRegion< VImageDimension >::Slice().

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< VImageDimension >.

Definition at line 155 of file itkRLEImage.h.

References itk::RLEImage< TPixel, VImageDimension, CounterType >::m_Buffer, itk::ImageBase< VImageDimension >::SetLargestPossibleRegion(), and itk::ImageRegion< VImageDimension >::Slice().

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 260 of file itkRLEImage.h.

References itk::RLEImage< TPixel, VImageDimension, CounterType >::CleanUp(), and itk::RLEImage< TPixel, VImageDimension, CounterType >::m_OnTheFlyCleanup.

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.

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.

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< VImageDimension >.

Definition at line 171 of file itkRLEImage.h.

References itk::RLEImage< TPixel, VImageDimension, CounterType >::m_Buffer, itk::ImageBase< VImageDimension >::SetRequestedRegion(), and itk::ImageRegion< VImageDimension >::Slice().

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

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

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 99 of file itkRLEImage.h.

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

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