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

#include <itkSparseImage.h>

+ Inheritance diagram for itk::SparseImage< TNode, VImageDimension >:
+ Collaboration diagram for itk::SparseImage< TNode, VImageDimension >:

Detailed Description

template<typename TNode, unsigned int VImageDimension = 2>
class itk::SparseImage< TNode, VImageDimension >

A storage type for sparse image data.

This class is derived from the Image class. It uses the base class image data for storing pointers to variables of type TNode. The node type must have a member variable m_Index. The node data is stored using the SparseFieldLayer and ObjectStore classes to allow sequential list access to the nodes. This functionality is used in filter classes that process the SparseImage class such as FiniteDifferenceSparseImageFilter. The node type must also have members NodeType* Next and NodeType* Previous. A minimal node class which could be used to create the sparse equivalent of an itk::Image<unsigned char, 2> is shown below:
* struct NodeType
* {
* NodeType* Next;
* NodeType* Previous;
* ImageType::IndexType m_Index;
* unsigned char m_Data;
* };
* typedef itk::SparseImage<NodeType, 2> SparseImageType;
*
This class provides the method AddNode which allocates a node variable, associates it with the image pixel index (sets m_Index in the node variable) and returns the pointer to the node variable. It is suggested that the user call the FillBuffer method to initialize the image to null pointers before any calls to AddNode. This would allow the user later to distinguish between valid and non-valid pixels.

Definition at line 67 of file itkSparseImage.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Superclass::IndexType IndexType
 
typedef Superclass::IOPixelType IOPixelType
 
typedef
NeighborhoodAccessorFunctor
< Self
NeighborhoodAccessorFunctorType
 
typedef SparseFieldLayer
< NodeType
NodeListType
 
typedef ObjectStore< NodeTypeNodeStoreType
 
typedef TNode NodeType
 
typedef SmartPointer< SelfPointer
 
typedef SparseImage Self
 
typedef Image< TNode
*, VImageDimension > 
Superclass
 
- Public Types inherited from itk::Image< TNode *, VImageDimension >
typedef
DefaultPixelAccessorFunctor
< Self
AccessorFunctorType
 
typedef DefaultPixelAccessor
< PixelType
AccessorType
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Superclass::DirectionType DirectionType
 
typedef
Superclass::ImageDimensionType 
ImageDimensionType
 
typedef Superclass::IndexType IndexType
 
typedef Superclass::IndexValueType IndexValueType
 
typedef TNode * InternalPixelType
 
typedef PixelType IOPixelType
 
typedef
NeighborhoodAccessorFunctor
< Self
NeighborhoodAccessorFunctorType
 
typedef Superclass::OffsetType OffsetType
 
typedef Superclass::OffsetValueType OffsetValueType
 
typedef ImportImageContainer
< SizeValueType, PixelType
PixelContainer
 
typedef
PixelContainer::ConstPointer 
PixelContainerConstPointer
 
typedef PixelContainer::Pointer PixelContainerPointer
 
typedef TNode * PixelType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::PointType PointType
 
typedef Superclass::RegionType RegionType
 
typedef Image Self
 
typedef Superclass::SizeType SizeType
 
typedef Superclass::SizeValueType SizeValueType
 
typedef Superclass::SpacingType SpacingType
 
typedef
Superclass::SpacingValueType 
SpacingValueType
 
typedef ImageBase
< VImageDimension > 
Superclass
 
typedef TNode * ValueType
 
- Public Types inherited from itk::ImageBase< VImageDimension >
typedef SmartPointer< const SelfConstPointer
 
typedef Matrix
< SpacePrecisionType,
VImageDimension,
VImageDimension > 
DirectionType
 
typedef unsigned int ImageDimensionType
 
typedef Index< VImageDimension > IndexType
 
typedef IndexType::IndexValueType IndexValueType
 
typedef Offset< VImageDimension > OffsetType
 
typedef OffsetType::OffsetValueType OffsetValueType
 
typedef SmartPointer< SelfPointer
 
typedef Point< PointValueType,
VImageDimension > 
PointType
 
typedef SpacePrecisionType PointValueType
 
typedef ImageRegion
< VImageDimension > 
RegionType
 
typedef ImageBase Self
 
typedef Size< VImageDimension > SizeType
 
typedef SizeType::SizeValueType SizeValueType
 
typedef Vector
< SpacingValueType,
VImageDimension > 
SpacingType
 
typedef SpacePrecisionType SpacingValueType
 
typedef DataObject Superclass
 
- Public Types inherited from itk::DataObject
typedef SmartPointer< const SelfConstPointer
 
typedef std::string DataObjectIdentifierType
 
typedef std::vector< Pointer >
::size_type 
DataObjectPointerArraySizeType
 
typedef SmartPointer< SelfPointer
 
typedef DataObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor ()
 
const
NeighborhoodAccessorFunctorType 
GetNeighborhoodAccessor () const
 
NodeListTypeGetNodeList ()
 
virtual void Initialize () override
 
NodeTypeAddNode (const IndexType &index)
 
- Public Member Functions inherited from itk::Image< TNode *, VImageDimension >
virtual void Allocate (bool initializePixels=false) override
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
void FillBuffer (const TNode *&value)
 
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor ()
 
const
NeighborhoodAccessorFunctorType 
GetNeighborhoodAccessor () const
 
virtual unsigned int GetNumberOfComponentsPerPixel () const override
 
const TNode *& GetPixel (const IndexType &index) const
 
TNode *& GetPixel (const IndexType &index)
 
AccessorType GetPixelAccessor (void)
 
const AccessorType GetPixelAccessor (void) const
 
PixelContainerGetPixelContainer ()
 
const PixelContainerGetPixelContainer () const
 
virtual void Graft (const DataObject *data) override
 
TNode *& operator[] (const IndexType &index)
 
const TNode *& operator[] (const IndexType &index) const
 
void SetPixel (const IndexType &index, const TNode *&value)
 
void SetPixelContainer (PixelContainer *container)
 
virtual TNode ** GetBufferPointer ()
 
virtual const TNode ** GetBufferPointer () const
 
- Public Member Functions inherited from itk::ImageBase< VImageDimension >
OffsetValueType ComputeOffset (const IndexType &ind) const
 
virtual 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 bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 
virtual void SetBufferedRegion (const RegionType &region)
 
virtual void SetDirection (const DirectionType &direction)
 
virtual void SetLargestPossibleRegion (const RegionType &region)
 
virtual void SetRegions (const SizeType &size)
 
virtual void SetRequestedRegion (const RegionType &region)
 
virtual void SetRequestedRegion (const DataObject *data) override
 
virtual 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 >
bool TransformPhysicalPointToIndex (const Point< TCoordRep, VImageDimension > &point, IndexType &index) const
 
template<typename TCoordRep >
void TransformPhysicalVectorToLocalVector (const FixedArray< TCoordRep, VImageDimension > &inputGradient, FixedArray< TCoordRep, VImageDimension > &outputGradient) const
 
virtual void UpdateOutputData () override
 
virtual void UpdateOutputInformation () override
 
virtual 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 , 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
 
SmartPointerForwardReference
< ProcessObject
GetSource () 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
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
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 Public Member Functions inherited from itk::Image< TNode *, VImageDimension >
static Pointer New ()
 
- 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 const unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::ImageBase< VImageDimension >
static const ImageDimensionType ImageDimension = VImageDimension
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
 SparseImage ()
 
 ~SparseImage ()
 
- Protected Member Functions inherited from itk::Image< TNode *, VImageDimension >
virtual void ComputeIndexToPhysicalPointMatrices () override
 
 Image ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual ~Image ()
 
- Protected Member Functions inherited from itk::ImageBase< VImageDimension >
void ComputeOffsetTable ()
 
 ImageBase ()
 
virtual void InitializeBufferedRegion ()
 
 ~ImageBase ()
 
OffsetValueType FastComputeOffset (const IndexType &ind) const
 
IndexType FastComputeIndex (OffsetValueType offset) const
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
virtual void PropagateResetPipeline ()
 
 ~DataObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- 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 Member Functions

void operator= (const Self &) ITK_DELETE_FUNCTION
 
 SparseImage (const Self &) ITK_DELETE_FUNCTION
 

Private Attributes

NodeListType::Pointer m_NodeList
 
NodeStoreType::Pointer m_NodeStore
 

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
AtomicInt< int > m_ReferenceCount
 

Member Typedef Documentation

template<typename TNode , unsigned int VImageDimension = 2>
typedef SmartPointer< const Self > itk::SparseImage< TNode, VImageDimension >::ConstPointer

Definition at line 74 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef WeakPointer< const Self > itk::SparseImage< TNode, VImageDimension >::ConstWeakPointer

Definition at line 75 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef Superclass::IndexType itk::SparseImage< TNode, VImageDimension >::IndexType

Types derived from the Superclass

Definition at line 91 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef Superclass::IOPixelType itk::SparseImage< TNode, VImageDimension >::IOPixelType

Definition at line 98 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef NeighborhoodAccessorFunctor< Self > itk::SparseImage< TNode, VImageDimension >::NeighborhoodAccessorFunctorType

Tyepdef for the functor used to access a neighborhood of pixel pointers.

Definition at line 96 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef SparseFieldLayer< NodeType > itk::SparseImage< TNode, VImageDimension >::NodeListType

The list types for storing the active pixels.

Definition at line 101 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef ObjectStore< NodeType > itk::SparseImage< TNode, VImageDimension >::NodeStoreType

Definition at line 102 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef TNode itk::SparseImage< TNode, VImageDimension >::NodeType

The actual sparse pixel type.

Definition at line 88 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef SmartPointer< Self > itk::SparseImage< TNode, VImageDimension >::Pointer

Definition at line 73 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef SparseImage itk::SparseImage< TNode, VImageDimension >::Self

Standard typedefs.

Definition at line 71 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
typedef Image< TNode *, VImageDimension > itk::SparseImage< TNode, VImageDimension >::Superclass

Definition at line 72 of file itkSparseImage.h.

Constructor & Destructor Documentation

template<typename TNode , unsigned int VImageDimension = 2>
itk::SparseImage< TNode, VImageDimension >::SparseImage ( )
protected
template<typename TNode , unsigned int VImageDimension = 2>
itk::SparseImage< TNode, VImageDimension >::~SparseImage ( )
inlineprotected

Definition at line 139 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
itk::SparseImage< TNode, VImageDimension >::SparseImage ( const Self )
private

Member Function Documentation

template<typename TNode , unsigned int VImageDimension = 2>
NodeType* itk::SparseImage< TNode, VImageDimension >::AddNode ( const IndexType index)
inline

This function should be used to allocate memory for a variable at the desired pixel location.

Definition at line 116 of file itkSparseImage.h.

References itk::SparseImage< TNode, VImageDimension >::m_NodeList, itk::SparseImage< TNode, VImageDimension >::m_NodeStore, and itk::Image< TNode *, VImageDimension >::SetPixel().

template<typename TNode , unsigned int VImageDimension = 2>
virtual::itk::LightObject::Pointer itk::SparseImage< TNode, VImageDimension >::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 TNode , unsigned int VImageDimension = 2>
virtual const char* itk::SparseImage< TNode, VImageDimension >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Image< TNode *, VImageDimension >.

template<typename TNode , unsigned int VImageDimension = 2>
NeighborhoodAccessorFunctorType itk::SparseImage< TNode, VImageDimension >::GetNeighborhoodAccessor ( )
inline

Return the NeighborhoodAccessor functor. This method is called by the neighborhood iterators.

Definition at line 106 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
const NeighborhoodAccessorFunctorType itk::SparseImage< TNode, VImageDimension >::GetNeighborhoodAccessor ( ) const
inline

Return the NeighborhoodAccessor functor. This method is called by the neighborhood iterators.

Definition at line 111 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
NodeListType* itk::SparseImage< TNode, VImageDimension >::GetNodeList ( )
inline

This function returns the allocated node list which can be used to iterate through the valid nodes.

Definition at line 128 of file itkSparseImage.h.

References itk::SparseImage< TNode, VImageDimension >::m_NodeList.

template<typename TNode , unsigned int VImageDimension = 2>
virtual void itk::SparseImage< TNode, VImageDimension >::Initialize ( )
overridevirtual

This function initializes the m_NodeList and m_NodeStore variables, and calls the superclass Initialize method.

Reimplemented from itk::Image< TNode *, VImageDimension >.

template<typename TNode , unsigned int VImageDimension = 2>
static Pointer itk::SparseImage< TNode, VImageDimension >::New ( )
static

Method for creation through the object factory.

template<typename TNode , unsigned int VImageDimension = 2>
void itk::SparseImage< TNode, VImageDimension >::operator= ( const Self )
private
template<typename TNode , unsigned int VImageDimension = 2>
void itk::SparseImage< TNode, VImageDimension >::PrintSelf ( std::ostream &  os,
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 >.

Member Data Documentation

template<typename TNode , unsigned int VImageDimension = 2>
const unsigned int itk::SparseImage< TNode, VImageDimension >::ImageDimension = Superclass::ImageDimension
static

Dimension of the image.

Definition at line 85 of file itkSparseImage.h.

template<typename TNode , unsigned int VImageDimension = 2>
NodeListType::Pointer itk::SparseImage< TNode, VImageDimension >::m_NodeList
private

The variables for storing the node variables.

Definition at line 145 of file itkSparseImage.h.

Referenced by itk::SparseImage< TNode, VImageDimension >::AddNode(), and itk::SparseImage< TNode, VImageDimension >::GetNodeList().

template<typename TNode , unsigned int VImageDimension = 2>
NodeStoreType::Pointer itk::SparseImage< TNode, VImageDimension >::m_NodeStore
private

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