ITK  4.6.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::HilbertPath< TIndexValue, VDimension > Class Template Reference

#include <itkHilbertPath.h>

+ Inheritance diagram for itk::HilbertPath< TIndexValue, VDimension >:
+ Collaboration diagram for itk::HilbertPath< TIndexValue, VDimension >:

Detailed Description

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
class itk::HilbertPath< TIndexValue, VDimension >

Represent an n-dimensional Hilbert path for a given order.

This class is used to construct a Hilbert spacing-filling curve (or path) for a given order and given dimension. The locality- preserving properties make the Hilbert path an attractive option for mapping multi-dimensional data to a single array.

The path is defined by its dimensionality and order( >= 1 ) with its starting point at [0]^Dimension. The size of the path in each dimension is 2^order where each discrete location is visited by that path. For example, a 2-D Hilbert path of order 8 can map each pixel of a 256x256 image onto a single array. More properties and visualizations can be found in various places on the web.

The implementation is based on Chris Hamilton, "Compact Hilbert Indices", Technical Report CS-2006-07, July 24, 2006. and a direct porting of the Aldo Cortesi's python code found at https://github.com/cortesi/scurve

Author
Nick Tustison

Definition at line 53 of file itkHilbertPath.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef unsigned int HilbertOrderType
 
typedef HilbertPathType::size_type HilbertPathSizeType
 
typedef std::vector< IndexTypeHilbertPathType
 
typedef OutputType IndexType
 
typedef Superclass::InputType InputType
 
typedef Superclass::OffsetType OffsetType
 
typedef Superclass::OutputType OutputType
 
typedef InputType PathIndexType
 
typedef SmartPointer< SelfPointer
 
typedef HilbertPath
< TIndexValue, VDimension > 
Self
 
typedef Path< unsigned int,
Index< VDimension >
, VDimension > 
Superclass
 
- Public Types inherited from itk::Path< TIndexValue, Index< VDimension >, VDimension >
typedef SmartPointer< const SelfConstPointer
 
typedef Index< VDimension > IndexType
 
typedef TIndexValue InputType
 
typedef Offset< VDimension > OffsetType
 
typedef Index< VDimension > OutputType
 
typedef SmartPointer< SelfPointer
 
typedef Path Self
 
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 (void) const
 
virtual InputType EndOfInput () const
 
virtual OutputType Evaluate (const PathIndexType &input) const
 
virtual InputType EvaluateInverse (const IndexType &input)
 
virtual OutputType EvaluateToIndex (const PathIndexType &input) const
 
virtual const char * GetNameOfClass () const
 
virtual OffsetType IncrementInput (InputType &) const
 
virtual HilbertPathSizeType NumberOfSteps () const
 
PathIndexType TransformMultiDimensionalIndexToPathIndex (const IndexType &index)
 
IndexType TransformPathIndexToMultiDimensionalIndex (const PathIndexType id)
 
virtual void Clear ()
 
virtual void Initialize (void)
 
virtual void SetHilbertOrder (HilbertOrderType _arg)
 
virtual HilbertOrderType GetHilbertOrder () const
 
- Public Member Functions inherited from itk::Path< TIndexValue, Index< VDimension >, VDimension >
virtual OutputType Evaluate (const InputType &input) const =0
 
virtual IndexType EvaluateToIndex (const InputType &input) const =0
 
virtual OffsetType IncrementInput (InputType &input) const =0
 
virtual InputType StartOfInput () const
 
- Public Member Functions inherited from itk::DataObject
virtual void CopyInformation (const 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 Graft (const DataObject *)
 
virtual void PrepareForNewData ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual void ResetPipeline ()
 
void SetReleaseDataFlag (bool flag)
 
virtual void SetRequestedRegion (const DataObject *)
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
virtual bool VerifyRequestedRegion ()
 
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 (void)
 
const MetaDataDictionaryGetMetaDataDictionary (void) 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 ITK_OVERRIDE
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) ITK_OVERRIDE
 
virtual void UnRegister () const ITK_OVERRIDE
 
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::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 Dimension = VDimension
 
- Static Public Attributes inherited from itk::Path< TIndexValue, Index< VDimension >, VDimension >
static const unsigned int PathDimension
 

Protected Member Functions

 HilbertPath ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
 ~HilbertPath ()
 
- Protected Member Functions inherited from itk::Path< TIndexValue, Index< VDimension >, VDimension >
virtual IndexType GetZeroIndex () const
 
virtual OffsetType GetZeroOffset () const
 
 Path ()
 
 ~Path ()
 
- 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 ConstructHilbertPath ()
 
PathIndexType GetBitRange (const PathIndexType, const PathIndexType, const PathIndexType, const PathIndexType)
 
PathIndexType GetDirection (const PathIndexType, const PathIndexType)
 
PathIndexType GetEntry (const PathIndexType)
 
PathIndexType GetGrayCode (const PathIndexType)
 
PathIndexType GetInverseGrayCode (const PathIndexType)
 
PathIndexType GetInverseTransform (const PathIndexType, const PathIndexType, const PathIndexType, const PathIndexType)
 
PathIndexType GetLeftBitRotation (PathIndexType, PathIndexType, const PathIndexType)
 
PathIndexType GetRightBitRotation (PathIndexType, PathIndexType, const PathIndexType)
 
PathIndexType GetTrailingSetBits (const PathIndexType, const PathIndexType)
 
PathIndexType GetTransform (const PathIndexType, const PathIndexType, const PathIndexType, const PathIndexType)
 
 HilbertPath (const Self &)
 
void operator= (const Self &)
 
PathIndexType SetBit (const PathIndexType, const PathIndexType, const PathIndexType, const PathIndexType)
 

Private Attributes

HilbertOrderType m_HilbertOrder
 
HilbertPathType m_HilbertPath
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

Member Typedef Documentation

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef SmartPointer<const Self> itk::HilbertPath< TIndexValue, VDimension >::ConstPointer

Definition at line 62 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef unsigned int itk::HilbertPath< TIndexValue, VDimension >::HilbertOrderType

Definition at line 80 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef HilbertPathType::size_type itk::HilbertPath< TIndexValue, VDimension >::HilbertPathSizeType

Definition at line 82 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef std::vector<IndexType> itk::HilbertPath< TIndexValue, VDimension >::HilbertPathType

Definition at line 81 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef OutputType itk::HilbertPath< TIndexValue, VDimension >::IndexType

Definition at line 79 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef Superclass::InputType itk::HilbertPath< TIndexValue, VDimension >::InputType

Definition at line 75 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef Superclass::OffsetType itk::HilbertPath< TIndexValue, VDimension >::OffsetType

Definition at line 83 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef Superclass::OutputType itk::HilbertPath< TIndexValue, VDimension >::OutputType

OutputType typedef support.

Definition at line 74 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef InputType itk::HilbertPath< TIndexValue, VDimension >::PathIndexType

The input/output typedefs

Definition at line 78 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef SmartPointer<Self> itk::HilbertPath< TIndexValue, VDimension >::Pointer

Definition at line 61 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef HilbertPath<TIndexValue, VDimension> itk::HilbertPath< TIndexValue, VDimension >::Self

Standard class typedefs.

Definition at line 59 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
typedef Path<unsigned int, Index<VDimension>, VDimension> itk::HilbertPath< TIndexValue, VDimension >::Superclass

Definition at line 60 of file itkHilbertPath.h.

Constructor & Destructor Documentation

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
itk::HilbertPath< TIndexValue, VDimension >::HilbertPath ( )
protected
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
itk::HilbertPath< TIndexValue, VDimension >::~HilbertPath ( )
inlineprotected

Definition at line 155 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
itk::HilbertPath< TIndexValue, VDimension >::HilbertPath ( const Self )
private

Member Function Documentation

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual void itk::HilbertPath< TIndexValue, VDimension >::Clear ( void  )
inlinevirtual
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
void itk::HilbertPath< TIndexValue, VDimension >::ConstructHilbertPath ( )
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual::itk::LightObject::Pointer itk::HilbertPath< TIndexValue, VDimension >::CreateAnother ( void  ) 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::Object.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual InputType itk::HilbertPath< TIndexValue, VDimension >::EndOfInput ( ) const
inlinevirtual

Where does the path end (what is the last valid input value)?

Reimplemented from itk::Path< TIndexValue, Index< VDimension >, VDimension >.

Definition at line 105 of file itkHilbertPath.h.

References itk::HilbertPath< TIndexValue, VDimension >::NumberOfSteps().

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual OutputType itk::HilbertPath< TIndexValue, VDimension >::Evaluate ( const PathIndexType input) const
inlinevirtual

Evaluate the hilbert path for the index at the specified path-position.

Definition at line 88 of file itkHilbertPath.h.

References itk::HilbertPath< TIndexValue, VDimension >::m_HilbertPath.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual InputType itk::HilbertPath< TIndexValue, VDimension >::EvaluateInverse ( const IndexType input)
inlinevirtual

Evaluate the hilbert path for the path-position at the specified index.

Definition at line 99 of file itkHilbertPath.h.

References itk::HilbertPath< TIndexValue, VDimension >::TransformMultiDimensionalIndexToPathIndex().

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual OutputType itk::HilbertPath< TIndexValue, VDimension >::EvaluateToIndex ( const PathIndexType input) const
inlinevirtual
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetBitRange ( const PathIndexType  ,
const PathIndexType  ,
const PathIndexType  ,
const PathIndexType   
)
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetDirection ( const PathIndexType  ,
const PathIndexType   
)
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetEntry ( const PathIndexType  )
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetGrayCode ( const PathIndexType  )
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual HilbertOrderType itk::HilbertPath< TIndexValue, VDimension >::GetHilbertOrder ( ) const
virtual

Set/get Hilbert order. The multi-dimensional space is of size 2^(HilbertOrder).

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetInverseGrayCode ( const PathIndexType  )
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetInverseTransform ( const PathIndexType  ,
const PathIndexType  ,
const PathIndexType  ,
const PathIndexType   
)
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetLeftBitRotation ( PathIndexType  ,
PathIndexType  ,
const PathIndexType   
)
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual const char* itk::HilbertPath< TIndexValue, VDimension >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Path< TIndexValue, Index< VDimension >, VDimension >.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetRightBitRotation ( PathIndexType  ,
PathIndexType  ,
const PathIndexType   
)
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetTrailingSetBits ( const PathIndexType  ,
const PathIndexType   
)
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::GetTransform ( const PathIndexType  ,
const PathIndexType  ,
const PathIndexType  ,
const PathIndexType   
)
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual OffsetType itk::HilbertPath< TIndexValue, VDimension >::IncrementInput ( InputType ) const
inlinevirtual

Increment the input variable passed by reference and then return the index stored at the new path-position.

Definition at line 113 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual void itk::HilbertPath< TIndexValue, VDimension >::Initialize ( void  )
inlinevirtual
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
static Pointer itk::HilbertPath< TIndexValue, VDimension >::New ( )
static

New() method for dynamic construction

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual HilbertPathSizeType itk::HilbertPath< TIndexValue, VDimension >::NumberOfSteps ( ) const
inlinevirtual
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
void itk::HilbertPath< TIndexValue, VDimension >::operator= ( const Self )
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
void itk::HilbertPath< TIndexValue, VDimension >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

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::Path< TIndexValue, Index< VDimension >, VDimension >.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::SetBit ( const PathIndexType  ,
const PathIndexType  ,
const PathIndexType  ,
const PathIndexType   
)
private
template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
virtual void itk::HilbertPath< TIndexValue, VDimension >::SetHilbertOrder ( HilbertOrderType  _arg)
virtual

Set/get Hilbert order. The multi-dimensional space is of size 2^(HilbertOrder).

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
PathIndexType itk::HilbertPath< TIndexValue, VDimension >::TransformMultiDimensionalIndexToPathIndex ( const IndexType index)

Convert the multidimensional index to the path index

Referenced by itk::HilbertPath< TIndexValue, VDimension >::EvaluateInverse().

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
IndexType itk::HilbertPath< TIndexValue, VDimension >::TransformPathIndexToMultiDimensionalIndex ( const PathIndexType  id)

Convert the path index to the multidimensional index location

Member Data Documentation

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
const unsigned int itk::HilbertPath< TIndexValue, VDimension >::Dimension = VDimension
static

Dimension underlying input image.

Definition at line 71 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
HilbertOrderType itk::HilbertPath< TIndexValue, VDimension >::m_HilbertOrder
private

Definition at line 186 of file itkHilbertPath.h.

template<typename TIndexValue = unsigned int, unsigned int VDimension = 3>
HilbertPathType itk::HilbertPath< TIndexValue, VDimension >::m_HilbertPath
private

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