ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
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 __itkTorusInteriorExteriorSpatialFunction_h 00019 #define __itkTorusInteriorExteriorSpatialFunction_h 00020 00021 #include "vnl/vnl_vector.h" 00022 #include "itkInteriorExteriorSpatialFunction.h" 00023 #include "itkCovariantVector.h" 00024 00025 namespace itk 00026 { 00039 template< unsigned int VDimension = 3, typename TInput = Point< double, 3 > > 00040 class ITK_EXPORT TorusInteriorExteriorSpatialFunction: 00041 public InteriorExteriorSpatialFunction< VDimension, TInput > 00042 { 00043 public: 00044 00046 typedef TorusInteriorExteriorSpatialFunction Self; 00047 typedef InteriorExteriorSpatialFunction< VDimension > Superclass; 00048 typedef SmartPointer< Self > Pointer; 00049 typedef SmartPointer< const Self > ConstPointer; 00050 00052 itkTypeMacro(TorusInteriorExteriorSpatialFunction, InteriorExteriorSpatialFunction); 00053 00055 itkNewMacro(Self); 00056 00058 typedef typename Superclass::InputType InputType; 00059 00061 typedef typename Superclass::OutputType OutputType; 00062 00064 OutputType Evaluate(const InputType & position) const; 00065 00068 itkGetConstMacro(Origin, InputType); 00069 itkSetMacro(Origin, InputType); 00071 00073 itkGetConstMacro(MajorRadius, double); 00074 itkSetMacro(MajorRadius, double); 00076 00078 itkGetConstMacro(MinorRadius, double); 00079 itkSetMacro(MinorRadius, double); 00080 protected: 00081 TorusInteriorExteriorSpatialFunction(); 00082 virtual ~TorusInteriorExteriorSpatialFunction(); 00083 void PrintSelf(std::ostream & os, Indent indent) const; 00085 00086 private: 00087 TorusInteriorExteriorSpatialFunction(const Self &); //purposely not 00088 // implemented 00089 void operator=(const Self &); //purposely not 00090 // implemented 00091 00094 InputType m_Origin; 00095 00097 double m_MajorRadius; 00098 00100 double m_MinorRadius; 00101 }; 00102 } // end namespace itk 00103 00104 // Define instantiation macro for this template. 00105 #define ITK_TEMPLATE_TorusInteriorExteriorSpatialFunction(_, EXPORT, TypeX, TypeY) \ 00106 namespace itk \ 00107 { \ 00108 _( 2 ( class EXPORT TorusInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 TypeX > ) ) \ 00109 namespace Templates \ 00110 { \ 00111 typedef TorusInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 TypeX > \ 00112 TorusInteriorExteriorSpatialFunction##TypeY; \ 00113 } \ 00114 } 00115 00116 #if ITK_TEMPLATE_EXPLICIT 00117 #include "Templates/itkTorusInteriorExteriorSpatialFunction+-.h" 00118 #endif 00119 00120 #if ITK_TEMPLATE_TXX 00121 #include "itkTorusInteriorExteriorSpatialFunction.hxx" 00122 #endif 00123 00124 #endif 00125