18 #ifndef itkChainCodePath2D_h 19 #define itkChainCodePath2D_h 23 #include "ITKPathExport.h" 56 itkStaticConstMacro(Dimension,
unsigned int, 2);
86 virtual OutputType Evaluate(
const InputType & input)
const ITK_OVERRIDE;
89 virtual IndexType EvaluateToIndex(
const InputType & input)
const ITK_OVERRIDE;
95 virtual OffsetType IncrementInput(InputType & input)
const ITK_OVERRIDE;
103 virtual inline ChainCodeSizeType
NumberOfSteps() const ITK_OVERRIDE {
return m_Chain2D.size(); }
108 m_Chain2D.insert(m_Chain2D.begin() + position, encodedStep);
113 virtual inline void InsertStep(InputType position, OffsetType step) ITK_OVERRIDE
115 m_Chain2D.insert( m_Chain2D.begin() + position, EncodeOffset(step) );
122 m_Chain2D[position] = encodedStep;
127 virtual inline void ChangeStep(InputType position, OffsetType step) ITK_OVERRIDE
129 m_Chain2D[position] = EncodeOffset(step);
134 virtual inline void Clear() ITK_OVERRIDE
141 std::string GetChainCodeAsString()
const;
146 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
151 return m_FreemanCode[step[0] + 1][step[1] + 1];
156 return m_ReverseFreemanCode[encodedStep];
161 void operator=(
const Self &) ITK_DELETE_FUNCTION;
172 int m_FreemanCode[3][3];
176 OffsetType m_ReverseFreemanCode[9];
ChainCode2DType m_Chain2D
std::vector< int > ChainCode2DType
OffsetType DecodeOffset(int encodedStep) const
Superclass::ChainCodeType ChainCodeType
Represent a path as a sequence of connected image index offsets.
Superclass::InputType InputType
ChainCodePath< 2 > Superclass
Superclass::OutputType OutputType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
SmartPointer< const Self > ConstPointer
void ChangeStep(InputType position, int encodedStep)
virtual void InsertStep(InputType position, OffsetType step) override
virtual void Clear() override
Superclass::ChainCodeSizeType ChainCodeSizeType
virtual void ChangeStep(InputType position, OffsetType step) override
int EncodeOffset(OffsetType step) const
Control indentation during Print() invocation.
SmartPointer< Self > Pointer
virtual ChainCodeSizeType NumberOfSteps() const override
Represent a n-dimensional index in a n-dimensional image.
Represent a 2D path as a sequence of connected image index offsets.
void InsertStep(InputType position, int encodedStep)