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 __itkSymmetricEllipsoidInteriorExteriorSpatialFunction_h 00019 #define __itkSymmetricEllipsoidInteriorExteriorSpatialFunction_h 00020 00021 #include "itkInteriorExteriorSpatialFunction.h" 00022 00023 namespace itk 00024 { 00038 template< unsigned int VDimension = 3, 00039 typename TInput = Point< double, VDimension > > 00040 class ITK_EXPORT SymmetricEllipsoidInteriorExteriorSpatialFunction: 00041 public InteriorExteriorSpatialFunction< VDimension, TInput > 00042 { 00043 public: 00045 typedef SymmetricEllipsoidInteriorExteriorSpatialFunction Self; 00046 typedef InteriorExteriorSpatialFunction< VDimension > Superclass; 00047 typedef SmartPointer< Self > Pointer; 00048 typedef SmartPointer< const Self > ConstPointer; 00049 typedef Vector< double, VDimension > VectorType; 00050 00052 itkNewMacro(Self); 00053 00055 itkTypeMacro(SymmetricEllipsoidInteriorExteriorSpatialFunction, InteriorExteriorSpatialFunction); 00056 00058 typedef typename Superclass::InputType InputType; 00059 00061 typedef typename Superclass::OutputType OutputType; 00062 00064 OutputType Evaluate(const InputType & position) const; 00065 00067 itkGetConstMacro(Center, InputType); 00068 itkSetMacro(Center, InputType); 00070 00073 void SetOrientation(VectorType orientation, double uniqueAxis, double symmetricAxes); 00074 00075 protected: 00076 SymmetricEllipsoidInteriorExteriorSpatialFunction(); 00077 virtual ~SymmetricEllipsoidInteriorExteriorSpatialFunction(); 00078 00079 void PrintSelf(std::ostream & os, Indent indent) const; 00080 00081 private: 00082 SymmetricEllipsoidInteriorExteriorSpatialFunction(const Self &); //purposely 00083 // not 00084 // implemented 00085 void operator=(const Self &); //purposely 00086 // not 00087 // implemented 00088 00090 InputType m_Center; 00091 00093 double m_UniqueAxis; 00094 00096 double m_SymmetricAxes; 00097 00099 Vector< double, VDimension > m_Orientation; 00100 00102 double m_VectorRatio; 00103 }; 00104 } // end namespace itk 00105 00106 // Define instantiation macro for this template. 00107 #define ITK_TEMPLATE_SymmetricEllipsoidInteriorExteriorSpatialFunction(_, EXPORT, TypeX, TypeY) \ 00108 namespace itk \ 00109 { \ 00110 _( 2 ( class EXPORT SymmetricEllipsoidInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 TypeX > ) ) \ 00111 namespace Templates \ 00112 { \ 00113 typedef SymmetricEllipsoidInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 TypeX > \ 00114 SymmetricEllipsoidInteriorExteriorSpatialFunction##TypeY; \ 00115 } \ 00116 } 00117 00118 #if ITK_TEMPLATE_EXPLICIT 00119 #include "Templates/itkSymmetricEllipsoidInteriorExteriorSpatialFunction+-.h" 00120 #endif 00121 00122 #if ITK_TEMPLATE_TXX 00123 #include "itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx" 00124 #endif 00125 00126 #endif 00127