18 #ifndef itkHilbertPath_h
19 #define itkHilbertPath_h
52 template<
typename TIndexValue =
unsigned int,
unsigned int VDimension = 3>
54 :
public Path<TIndexValue, Index<VDimension>, VDimension>
72 static constexpr
unsigned int Dimension = VDimension;
91 return this->m_HilbertPath[input];
96 return this->m_HilbertPath[input];
102 return this->TransformMultiDimensionalIndexToPathIndex( input );
108 return static_cast<InputType>( this->NumberOfSteps() );
116 itkExceptionMacro(
"Not implemented." );
122 this->m_HilbertPath.clear();
130 return m_HilbertPath.size();
137 this->ConstructHilbertPath();
145 itkGetConstMacro( HilbertOrder, HilbertOrderType );
149 IndexType TransformPathIndexToMultiDimensionalIndex(
const PathIndexType
id );
152 PathIndexType TransformMultiDimensionalIndexToPathIndex(
const IndexType & index );
157 void PrintSelf( std::ostream & os,
Indent indent )
const override;
160 void ConstructHilbertPath();
162 PathIndexType GetTransform(
const PathIndexType,
const PathIndexType,
const PathIndexType,
const PathIndexType );
164 PathIndexType GetInverseTransform(
const PathIndexType,
const PathIndexType,
const PathIndexType,
const PathIndexType );
166 PathIndexType GetGrayCode(
const PathIndexType );
168 PathIndexType GetInverseGrayCode(
const PathIndexType );
170 PathIndexType SetBit(
const PathIndexType,
const PathIndexType,
const PathIndexType,
const PathIndexType );
172 PathIndexType GetRightBitRotation( PathIndexType, PathIndexType,
const PathIndexType );
174 PathIndexType GetLeftBitRotation( PathIndexType, PathIndexType,
const PathIndexType );
176 PathIndexType GetTrailingSetBits(
const PathIndexType,
const PathIndexType );
178 PathIndexType GetDirection(
const PathIndexType,
const PathIndexType );
180 PathIndexType GetEntry(
const PathIndexType );
182 PathIndexType GetBitRange(
const PathIndexType,
const PathIndexType,
const PathIndexType,
const PathIndexType );
189 #ifndef ITK_MANUAL_INSTANTIATION
190 #include "itkHilbertPath.hxx"
Represent an n-dimensional Hilbert path for a given order.
unsigned int HilbertOrderType
Define numeric traits for std::vector.
void Initialize() override
typename Superclass::OutputType OutputType
typename HilbertPathType::size_type HilbertPathSizeType
constexpr unsigned int Dimension
InputType EndOfInput() const override
Represent a path through ND Space.
HilbertPathType m_HilbertPath
ImageBaseType::IndexType IndexType
OutputType EvaluateToIndex(const PathIndexType &input) const override
OffsetType IncrementInput(InputType &) const override
OutputType Evaluate(const PathIndexType &input) const override
std::vector< IndexType > HilbertPathType
virtual InputType EvaluateInverse(const IndexType &input)
Control indentation during Print() invocation.
typename Superclass::OffsetType OffsetType
Base class for most ITK classes.
virtual HilbertPathSizeType NumberOfSteps() const
Base class for all data objects in ITK.
typename Superclass::InputType InputType