ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkPolyLineParametricPath.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkPolyLineParametricPath_h
19 #define itkPolyLineParametricPath_h
20 
21 #include "itkParametricPath.h"
22 #include "itkVectorContainer.h"
23 #include "itkIndex.h"
24 
25 namespace itk
26 {
55 template< unsigned int VDimension >
56 class ITK_TEMPLATE_EXPORT PolyLineParametricPath:public
57  ParametricPath< VDimension >
58 {
59 public:
60  ITK_DISALLOW_COPY_AND_ASSIGN(PolyLineParametricPath);
61 
67 
70 
72  using InputType = typename Superclass::InputType;
73 
75  using OutputType = typename Superclass::OutputType;
76 
78  using ContinuousIndexType = typename Superclass::ContinuousIndexType;
86 
88  OutputType Evaluate(const InputType & input) const override;
89 
92  //virtual VectorType EvaluateDerivative(const InputType & input) const;
93 
98  inline void AddVertex(const ContinuousIndexType & vertex)
99  {
100  m_VertexList->InsertElement(m_VertexList->Size(), vertex);
101  this->Modified();
102  }
104 
108  InputType EndOfInput() const override
109  {
110  return m_VertexList->Size() - 1;
111  }
112 
114  itkNewMacro(Self);
115 
117  void Initialize() override
118  {
119  m_VertexList->Initialize();
120  }
121 
123  itkGetModifiableObjectMacro(VertexList, VertexListType);
124 
129  OffsetType IncrementInput(InputType & input) const override;
130 
134  VectorType EvaluateDerivative(const InputType & input) const override;
135 
136 protected:
138  ~PolyLineParametricPath() override = default;
139  void PrintSelf(std::ostream & os, Indent indent) const override;
140 
141 private:
143 };
144 } // end namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkPolyLineParametricPath.hxx"
148 #endif
149 
150 #endif
InputType EndOfInput() const override
Represent a path of line segments through ND Space.
void AddVertex(const ContinuousIndexType &vertex)
typename VertexListType::Pointer VertexListPointer
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:66
typename Superclass::InputType InputType
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image...
Definition: itkOffset.h:67
Represent a parametric path through ND Space.
A templated class holding a point in n-Dimensional image space.
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
typename Superclass::OutputType OutputType
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52
Base class for all data objects in ITK.