#include <itkChainCodePath2D.h>
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 that of 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).
Definition at line 51 of file itkChainCodePath2D.h.
Public Member Functions | |
void | ChangeStep (InputType position, OffsetType step) override |
virtual::itk::LightObject::Pointer | CreateAnother () const |
OutputType | Evaluate (const InputType &input) const override |
IndexType | EvaluateToIndex (const InputType &input) const override |
std::string | GetChainCodeAsString () const |
const char * | GetNameOfClass () const override |
OffsetType | IncrementInput (InputType &input) const override |
void | InsertStep (InputType position, OffsetType step) override |
ChainCodeSizeType | NumberOfSteps () const override |
void | InsertStep (InputType position, int encodedStep) |
void | ChangeStep (InputType position, int encodedStep) |
void | Clear () override |
![]() | |
virtual::itk::LightObject::Pointer | CreateAnother () const |
virtual::itk::LightObject::Pointer | CreateAnother () const |
InputType | EndOfInput () const override |
InputType | EndOfInput () const override |
OutputType | Evaluate (const InputType &input) const override |
OutputType | Evaluate (const InputType &input) const override |
IndexType | EvaluateToIndex (const InputType &input) const override |
IndexType | EvaluateToIndex (const InputType &input) const override |
const char * | GetNameOfClass () const override |
const char * | GetNameOfClass () const override |
OffsetType | IncrementInput (InputType &input) const override |
OffsetType | IncrementInput (InputType &input) const override |
virtual void | SetStart (IndexType _arg) |
virtual const IndexType & | GetStart () const |
virtual void | SetStart (IndexType _arg) |
virtual const IndexType & | GetStart () const |
void | Initialize () override |
void | Initialize () override |
![]() | |
const char * | GetNameOfClass () const override |
const char * | GetNameOfClass () const override |
virtual InputType | StartOfInput () const |
virtual InputType | StartOfInput () const |
![]() | |
virtual void | CopyInformation (const DataObject *) |
virtual void | DataHasBeenGenerated () |
void | DisconnectPipeline () |
bool | GetDataReleased () const |
virtual const bool & | GetReleaseDataFlag () const |
SmartPointer< ProcessObject > | GetSource () const |
DataObjectPointerArraySizeType | GetSourceOutputIndex () const |
const DataObjectIdentifierType & | GetSourceOutputName () const |
virtual ModifiedTimeType | GetUpdateMTime () const |
virtual void | 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 () |
void | UpdateSource () const |
virtual bool | VerifyRequestedRegion () |
void | SetPipelineMTime (ModifiedTimeType time) |
virtual const ModifiedTimeType & | GetPipelineMTime () const |
virtual void | SetRealTimeStamp (RealTimeStamp _arg) |
virtual const RealTimeStamp & | GetRealTimeStamp () const |
![]() | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
![]() | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static Pointer | New () |
static Pointer | New () |
![]() | |
static bool | GetGlobalReleaseDataFlag () |
static void | GlobalReleaseDataFlagOff () |
static void | GlobalReleaseDataFlagOn () |
static Pointer | New () |
static void | SetGlobalReleaseDataFlag (bool val) |
![]() | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
![]() | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | Dimension = 2 |
![]() | |
static constexpr unsigned int | Dimension |
static constexpr unsigned int | Dimension |
![]() | |
static constexpr unsigned int | PathDimension |
static constexpr unsigned int | PathDimension |
Protected Member Functions | |
ChainCodePath2D () | |
OffsetType | DecodeOffset (int encodedStep) const |
int | EncodeOffset (OffsetType step) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~ChainCodePath2D () override | |
![]() | |
ChainCodePath () | |
ChainCodePath () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~ChainCodePath () override=default | |
~ChainCodePath () override=default | |
![]() | |
virtual IndexType | GetZeroIndex () const |
virtual IndexType | GetZeroIndex () const |
virtual OffsetType | GetZeroOffset () const |
virtual OffsetType | GetZeroOffset () const |
Path () | |
Path () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~Path () override=default | |
~Path () override=default | |
![]() | |
DataObject () | |
virtual void | PropagateResetPipeline () |
~DataObject () override | |
![]() | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
![]() | |
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 | |
ChainCode2DType | m_Chain2D {} |
int | m_FreemanCode [3][3] {} |
OffsetType | m_ReverseFreemanCode [9] {} |
Additional Inherited Members | |
![]() | |
std::atomic< int > | m_ReferenceCount {} |
using itk::ChainCodePath2D::ChainCode2DType = std::vector<int> |
ChainCodePath2D stores its data as a Freeman-encoded chain code
Definition at line 82 of file itkChainCodePath2D.h.
Definition at line 79 of file itkChainCodePath2D.h.
ChainCodeType is a useless relic of the parent class
Definition at line 78 of file itkChainCodePath2D.h.
using itk::ChainCodePath2D::ConstPointer = SmartPointer<const Self> |
Definition at line 64 of file itkChainCodePath2D.h.
using itk::ChainCodePath2D::IndexType = Index<2> |
Definition at line 75 of file itkChainCodePath2D.h.
Definition at line 71 of file itkChainCodePath2D.h.
The output type of this function is an Index
Definition at line 74 of file itkChainCodePath2D.h.
OutputType type alias support
Definition at line 70 of file itkChainCodePath2D.h.
Definition at line 63 of file itkChainCodePath2D.h.
Standard class type aliases.
Definition at line 60 of file itkChainCodePath2D.h.
using itk::ChainCodePath2D::Superclass = ChainCodePath<2> |
Definition at line 61 of file itkChainCodePath2D.h.
|
protected |
Referenced by GetNameOfClass().
|
overrideprotected |
|
inline |
Change the direction of a step in the chaincode
Definition at line 131 of file itkChainCodePath2D.h.
References m_Chain2D, and itk::Object::Modified().
|
inlineoverridevirtual |
Change the direction of a step in the chaincode
Reimplemented from itk::ChainCodePath< 2 >.
Definition at line 139 of file itkChainCodePath2D.h.
References EncodeOffset(), m_Chain2D, and itk::Object::Modified().
|
inlineoverridevirtual |
Remove all steps from the chain code
Reimplemented from itk::ChainCodePath< 2 >.
Definition at line 147 of file itkChainCodePath2D.h.
References m_Chain2D, and itk::Object::Modified().
|
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::LightObject.
|
inlineprotected |
Definition at line 171 of file itkChainCodePath2D.h.
References m_ReverseFreemanCode.
|
inlineprotected |
Encode and Decode between an offset and a Freeman code
Definition at line 165 of file itkChainCodePath2D.h.
References m_FreemanCode.
Referenced by ChangeStep(), and InsertStep().
|
overridevirtual |
Evaluate the chaincode for the offset at the specified path-position.
Implements itk::Path< unsigned int, Offset< VDimension >, VDimension >.
Like Evaluate(), but returns the index at the specified path-position.
Implements itk::Path< unsigned int, Offset< VDimension >, VDimension >.
std::string itk::ChainCodePath2D::GetChainCodeAsString | ( | ) | const |
|
overridevirtual |
Reimplemented from itk::LightObject.
References ChainCodePath2D().
|
overridevirtual |
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.
Implements itk::Path< unsigned int, Offset< VDimension >, VDimension >.
|
inline |
Insert a new step into the chaincode at a specified position
Definition at line 115 of file itkChainCodePath2D.h.
References m_Chain2D, and itk::Object::Modified().
|
inlineoverridevirtual |
Insert a new step into the chaincode at a specified position
Reimplemented from itk::ChainCodePath< 2 >.
Definition at line 123 of file itkChainCodePath2D.h.
References EncodeOffset(), m_Chain2D, and itk::Object::Modified().
|
inlineoverridevirtual |
How many steps in the chaincode?
Reimplemented from itk::ChainCodePath< 2 >.
Definition at line 108 of file itkChainCodePath2D.h.
References m_Chain2D.
|
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::LightObject.
|
staticconstexpr |
Dimension underlying input image.
Definition at line 57 of file itkChainCodePath2D.h.
|
private |
Definition at line 177 of file itkChainCodePath2D.h.
Referenced by ChangeStep(), ChangeStep(), Clear(), InsertStep(), InsertStep(), and NumberOfSteps().
|
private |
Definition at line 186 of file itkChainCodePath2D.h.
Referenced by EncodeOffset().
|
private |
Definition at line 190 of file itkChainCodePath2D.h.
Referenced by DecodeOffset().