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::ChainCodePath2D Class Reference

#include <itkChainCodePath2D.h>

+ Inheritance diagram for itk::ChainCodePath2D:
+ Collaboration diagram for itk::ChainCodePath2D:

Detailed Description

Represent a 2D path as a sequence of connected image index offsets.

This class is intended to represent sequences of connected indices in a 2D image plane. It does so by storing the offset of each index from its immediately preceding, connected, index using a standard Freeman code (1=up, 2=up to the right, and so on proceeding clockwise to 8=up to the left). The only image index stored directly is thatof the first index. ChainCodePath2D maps a 1D integer input (step number) to a 2D integer output (either an offset or an image index, depending on whether Evaluate or EvaluateToIndex is called).

See Also
ChainCodePath
ParametricPath
Path
Index

Definition at line 50 of file itkChainCodePath2D.h.

Public Types

typedef std::vector< int > ChainCode2DType
 
typedef
Superclass::ChainCodeSizeType 
ChainCodeSizeType
 
typedef Superclass::ChainCodeType ChainCodeType
 
typedef SmartPointer< const SelfConstPointer
 
typedef Index< 2 > IndexType
 
typedef Superclass::InputType InputType
 
typedef OutputType OffsetType
 
typedef Superclass::OutputType OutputType
 
typedef SmartPointer< SelfPointer
 
typedef ChainCodePath2D Self
 
typedef ChainCodePath< 2 > Superclass
 
- Public Types inherited from itk::ChainCodePath< 2 >
typedef ChainCodeType::size_type ChainCodeSizeType
 
typedef std::vector< OffsetTypeChainCodeType
 
typedef SmartPointer< const SelfConstPointer
 
typedef Index< VDimension > IndexType
 
typedef Superclass::InputType InputType
 
typedef OutputType OffsetType
 
typedef Superclass::OutputType OutputType
 
typedef SmartPointer< SelfPointer
 
typedef ChainCodePath< VDimension > Self
 
typedef Path< unsigned int,
Offset< VDimension >
, VDimension > 
Superclass
 
- Public Types inherited from itk::Path< unsigned int, Offset< VDimension >, VDimension >
typedef SmartPointer< const SelfConstPointer
 
typedef Index< VDimension > IndexType
 
typedef unsigned int InputType
 
typedef Offset< VDimension > OffsetType
 
typedef Offset< 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 void ChangeStep (InputType position, OffsetType step) ITK_OVERRIDE
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual OutputType Evaluate (const InputType &input) const ITK_OVERRIDE
 
virtual IndexType EvaluateToIndex (const InputType &input) const ITK_OVERRIDE
 
std::string GetChainCodeAsString (void) const
 
virtual const char * GetNameOfClass () const
 
virtual OffsetType IncrementInput (InputType &input) const ITK_OVERRIDE
 
virtual void InsertStep (InputType position, OffsetType step) ITK_OVERRIDE
 
virtual ChainCodeSizeType NumberOfSteps () const ITK_OVERRIDE
 
void InsertStep (InputType position, int encodedStep)
 
void ChangeStep (InputType position, int encodedStep)
 
virtual void Clear () ITK_OVERRIDE
 
- Public Member Functions inherited from itk::ChainCodePath< 2 >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual InputType EndOfInput () const
 
virtual void SetStart (IndexType _arg)
 
virtual const IndexTypeGetStart () const
 
virtual void Initialize (void)
 
- Public Member Functions inherited from itk::Path< unsigned int, Offset< 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::ChainCodePath< 2 >
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 = 2
 
- Static Public Attributes inherited from itk::ChainCodePath< 2 >
static const unsigned int Dimension
 
- Static Public Attributes inherited from itk::Path< unsigned int, Offset< VDimension >, VDimension >
static const unsigned int PathDimension
 

Protected Member Functions

 ChainCodePath2D ()
 
OffsetType DecodeOffset (int encodedStep) const
 
int EncodeOffset (OffsetType step) const
 
virtual void PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE
 
 ~ChainCodePath2D ()
 
- Protected Member Functions inherited from itk::ChainCodePath< 2 >
 ChainCodePath ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
 ~ChainCodePath ()
 
- Protected Member Functions inherited from itk::Path< unsigned int, Offset< 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

 ChainCodePath2D (const Self &)
 
void operator= (const Self &)
 

Private Attributes

ChainCode2DType m_Chain2D
 
int m_FreemanCode [3][3]
 
OffsetType m_ReverseFreemanCode [9]
 

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

typedef std::vector< int > itk::ChainCodePath2D::ChainCode2DType

ChainCodePath2D stores its data as a Freeman-encoded chain code

Definition at line 80 of file itkChainCodePath2D.h.

typedef Superclass::ChainCodeSizeType itk::ChainCodePath2D::ChainCodeSizeType

Definition at line 77 of file itkChainCodePath2D.h.

typedef Superclass::ChainCodeType itk::ChainCodePath2D::ChainCodeType

ChainCodeType is a usless relic of the parent class

Definition at line 76 of file itkChainCodePath2D.h.

Definition at line 62 of file itkChainCodePath2D.h.

Definition at line 73 of file itkChainCodePath2D.h.

typedef Superclass::InputType itk::ChainCodePath2D::InputType

Definition at line 69 of file itkChainCodePath2D.h.

The output type of this function is an Index

Definition at line 72 of file itkChainCodePath2D.h.

typedef Superclass::OutputType itk::ChainCodePath2D::OutputType

OutputType typedef support.

Definition at line 65 of file itkChainCodePath2D.h.

Definition at line 61 of file itkChainCodePath2D.h.

Standard class typedefs.

Definition at line 58 of file itkChainCodePath2D.h.

Definition at line 59 of file itkChainCodePath2D.h.

Constructor & Destructor Documentation

itk::ChainCodePath2D::ChainCodePath2D ( )
protected
itk::ChainCodePath2D::~ChainCodePath2D ( )
protected
itk::ChainCodePath2D::ChainCodePath2D ( const Self )
private

Member Function Documentation

void itk::ChainCodePath2D::ChangeStep ( InputType  position,
int  encodedStep 
)
inline

Change the direction of a step in the chaincode

Definition at line 119 of file itkChainCodePath2D.h.

References m_Chain2D, and itk::Object::Modified().

virtual void itk::ChainCodePath2D::ChangeStep ( InputType  position,
OffsetType  step 
)
inlinevirtual

Change the direction of a step in the chaincode

Reimplemented from itk::ChainCodePath< 2 >.

Definition at line 126 of file itkChainCodePath2D.h.

References EncodeOffset(), m_Chain2D, and itk::Object::Modified().

virtual void itk::ChainCodePath2D::Clear ( void  )
inlinevirtual

Remove all steps from the chain code

Reimplemented from itk::ChainCodePath< 2 >.

Definition at line 133 of file itkChainCodePath2D.h.

References m_Chain2D, and itk::Object::Modified().

virtual::itk::LightObject::Pointer itk::ChainCodePath2D::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.

OffsetType itk::ChainCodePath2D::DecodeOffset ( int  encodedStep) const
inlineprotected

Definition at line 153 of file itkChainCodePath2D.h.

References m_ReverseFreemanCode.

int itk::ChainCodePath2D::EncodeOffset ( OffsetType  step) const
inlineprotected

Encode and Decode between an offset and a Freeman code

Definition at line 148 of file itkChainCodePath2D.h.

References m_FreemanCode.

Referenced by ChangeStep(), and InsertStep().

virtual OutputType itk::ChainCodePath2D::Evaluate ( const InputType input) const
virtual

Evaluate the chaincode for the offset at the specified path-position.

Reimplemented from itk::ChainCodePath< 2 >.

virtual IndexType itk::ChainCodePath2D::EvaluateToIndex ( const InputType input) const
virtual

Like Evaluate(), but returns the index at the specified path-position.

Reimplemented from itk::ChainCodePath< 2 >.

std::string itk::ChainCodePath2D::GetChainCodeAsString ( void  ) const
virtual const char* itk::ChainCodePath2D::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ChainCodePath< 2 >.

virtual OffsetType itk::ChainCodePath2D::IncrementInput ( InputType input) const
virtual

Increment the input variable passed by reference and return the offset stored at the previous path-position. If the chaincode is unable to be incremented, input is not changed and an offset of zero is returned, which may be used to check for the end of the chain code.

Reimplemented from itk::ChainCodePath< 2 >.

void itk::ChainCodePath2D::InsertStep ( InputType  position,
int  encodedStep 
)
inline

Insert a new step into the chaincode at a specified position

Definition at line 105 of file itkChainCodePath2D.h.

References m_Chain2D, and itk::Object::Modified().

virtual void itk::ChainCodePath2D::InsertStep ( InputType  position,
OffsetType  step 
)
inlinevirtual

Insert a new step into the chaincode at a specified position

Reimplemented from itk::ChainCodePath< 2 >.

Definition at line 112 of file itkChainCodePath2D.h.

References EncodeOffset(), m_Chain2D, and itk::Object::Modified().

static Pointer itk::ChainCodePath2D::New ( )
static

New() method for dynamic construction

virtual ChainCodeSizeType itk::ChainCodePath2D::NumberOfSteps ( ) const
inlinevirtual

How many steps in the chaincode?

Reimplemented from itk::ChainCodePath< 2 >.

Definition at line 102 of file itkChainCodePath2D.h.

References m_Chain2D.

void itk::ChainCodePath2D::operator= ( const Self )
private
virtual void itk::ChainCodePath2D::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< unsigned int, Offset< VDimension >, VDimension >.

Member Data Documentation

const unsigned int itk::ChainCodePath2D::Dimension = 2
static

Dimension underlying input image.

Definition at line 55 of file itkChainCodePath2D.h.

ChainCode2DType itk::ChainCodePath2D::m_Chain2D
private

Definition at line 162 of file itkChainCodePath2D.h.

Referenced by ChangeStep(), Clear(), InsertStep(), and NumberOfSteps().

int itk::ChainCodePath2D::m_FreemanCode[3][3]
private

Definition at line 171 of file itkChainCodePath2D.h.

Referenced by EncodeOffset().

OffsetType itk::ChainCodePath2D::m_ReverseFreemanCode[9]
private

Definition at line 175 of file itkChainCodePath2D.h.

Referenced by DecodeOffset().


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