ITK  4.2.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_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;
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 inline InputType EndOfInput() const
107  {
108  return m_VertexList->Size() - 1;
109  }
110 
112  itkNewMacro(Self);
113 
115  virtual void Initialize(void)
116  {
117  m_VertexList->Initialize();
118  }
119 
121  itkGetConstObjectMacro(VertexList, VertexListType);
122 protected:
125  void PrintSelf(std::ostream & os, Indent indent) const;
127 
128 private:
129  PolyLineParametricPath(const Self &); //purposely not implemented
130  void operator=(const Self &); //purposely not implemented
131 
133 };
134 } // end namespace itk
135 
136 // Define instantiation macro for this template.
137 #define ITK_TEMPLATE_PolyLineParametricPath(_, EXPORT, TypeX, TypeY) \
138  namespace itk \
139  { \
140  _( 1 ( class EXPORT PolyLineParametricPath< ITK_TEMPLATE_1 TypeX > ) ) \
141  namespace Templates \
142  { \
143  typedef PolyLineParametricPath< ITK_TEMPLATE_1 TypeX > \
144  PolyLineParametricPath##TypeY; \
145  } \
146  }
147 
148 #if ITK_TEMPLATE_EXPLICIT
149 #include "Templates/itkPolyLineParametricPath+-.h"
150 #endif
151 
152 #if ITK_TEMPLATE_TXX
153 #include "itkPolyLineParametricPath.hxx"
154 #endif
155 
156 #endif
157