ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkParametricPath.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkParametricPath_h
00019 #define __itkParametricPath_h
00020 
00021 #include "itkPath.h"
00022 #include "itkContinuousIndex.h"
00023 #include "itkOffset.h"
00024 #include "itkVector.h"
00025 
00026 namespace itk
00027 {
00059 template< unsigned int VDimension >
00060 class ITK_EXPORT ParametricPath:public
00061   Path< double, ContinuousIndex< double, VDimension >, VDimension >
00062 {
00063 public:
00065   typedef ParametricPath                                                    Self;
00066   typedef Path< double, ContinuousIndex< double, VDimension >, VDimension > Superclass;
00067   typedef SmartPointer< Self >                                              Pointer;
00068   typedef SmartPointer< const Self >                                        ConstPointer;
00069 
00071   itkTypeMacro(ParametricPath, Path);
00072 
00074   typedef typename Superclass::InputType InputType;
00075 
00077   typedef typename Superclass::OutputType OutputType;
00078 
00080   typedef ContinuousIndex< double, VDimension > ContinuousIndexType;
00081   typedef Index<  VDimension >                  IndexType;
00082   typedef Offset< VDimension >                  OffsetType;
00083   typedef Vector< double, VDimension >          VectorType;
00084 
00087   virtual IndexType EvaluateToIndex(const InputType & input) const;
00088 
00104   virtual OffsetType IncrementInput(InputType & input) const;
00105 
00112   virtual VectorType EvaluateDerivative(const InputType & input) const;
00113 
00114   itkSetMacro(DefaultInputStepSize, InputType)
00115   itkGetConstReferenceMacro(DefaultInputStepSize, InputType)
00116 protected:
00117   ParametricPath();
00118   ~ParametricPath(){}
00119   void PrintSelf(std::ostream & os, Indent indent) const;
00120 
00131   InputType m_DefaultInputStepSize;
00132 private:
00133   ParametricPath(const Self &); //purposely not implemented
00134   void operator=(const Self &); //purposely not implemented
00135 };
00137 
00138 } // namespace itk
00139 
00140 // Define instantiation macro for this template.
00141 #define ITK_TEMPLATE_ParametricPath(_, EXPORT, TypeX, TypeY)     \
00142   namespace itk                                                  \
00143   {                                                              \
00144   _( 1 ( class EXPORT ParametricPath< ITK_TEMPLATE_1 TypeX > ) ) \
00145   namespace Templates                                            \
00146   {                                                              \
00147   typedef ParametricPath< ITK_TEMPLATE_1 TypeX >                 \
00148   ParametricPath##TypeY;                                       \
00149   }                                                              \
00150   }
00151 
00152 #if ITK_TEMPLATE_EXPLICIT
00153 #include "Templates/itkParametricPath+-.h"
00154 #endif
00155 
00156 #if ITK_TEMPLATE_TXX
00157 #include "itkParametricPath.hxx"
00158 #endif
00159 
00160 #endif
00161