ITK  4.13.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:
65 
68 
70  typedef typename Superclass::InputType InputType;
71 
73  typedef typename Superclass::OutputType OutputType;
74 
84 
86  virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE;
87 
90  //virtual VectorType EvaluateDerivative(const InputType & input) const;
91 
96  inline void AddVertex(const ContinuousIndexType & vertex)
97  {
98  m_VertexList->InsertElement(m_VertexList->Size(), vertex);
99  this->Modified();
100  }
102 
106  virtual InputType EndOfInput() const ITK_OVERRIDE
107  {
108  return m_VertexList->Size() - 1;
109  }
110 
112  itkNewMacro(Self);
113 
115  virtual void Initialize(void) ITK_OVERRIDE
116  {
117  m_VertexList->Initialize();
118  }
119 
121  itkGetModifiableObjectMacro(VertexList, VertexListType);
122 
127  virtual OffsetType IncrementInput(InputType & input) const ITK_OVERRIDE;
128 
132  virtual VectorType EvaluateDerivative(const InputType & input) const ITK_OVERRIDE;
133 
134 protected:
136  ~PolyLineParametricPath() ITK_OVERRIDE {}
137  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
138 
139 private:
140  ITK_DISALLOW_COPY_AND_ASSIGN(PolyLineParametricPath);
141 
143 };
144 } // end namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkPolyLineParametricPath.hxx"
148 #endif
149 
150 #endif
Represent a path of line segments through ND Space.
void AddVertex(const ContinuousIndexType &vertex)
SmartPointer< const Self > ConstPointer
Superclass::OutputType OutputType
VertexListType::Pointer VertexListPointer
Superclass::InputType InputType
Superclass::ContinuousIndexType ContinuousIndexType
virtual void Initialize(void) override
Point< double, VDimension > PointType
Represent a parametric path through ND Space.
virtual InputType EndOfInput() const override
VectorContainer< unsigned, VertexType > VertexListType
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
ParametricPath< VDimension > Superclass
Vector< double, VDimension > VectorType
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52