ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkEllipsoidInteriorExteriorSpatialFunction.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 __itkEllipsoidInteriorExteriorSpatialFunction_h
00019 #define __itkEllipsoidInteriorExteriorSpatialFunction_h
00020 
00021 #include "itkInteriorExteriorSpatialFunction.h"
00022 #include "vnl/vnl_matrix_fixed.h"
00023 
00024 namespace itk
00025 {
00038 template< unsigned int VDimension = 3,
00039           typename TInput = Point< double, VDimension > >
00040 class ITK_EXPORT EllipsoidInteriorExteriorSpatialFunction:
00041   public InteriorExteriorSpatialFunction< VDimension, TInput >
00042 {
00043 public:
00044 
00046   typedef EllipsoidInteriorExteriorSpatialFunction              Self;
00047   typedef InteriorExteriorSpatialFunction< VDimension, TInput > Superclass;
00048   typedef SmartPointer< Self >                                  Pointer;
00049   typedef SmartPointer< const Self >                            ConstPointer;
00050 
00052   itkTypeMacro(EllipsoidInteriorExteriorSpatialFunction, InteriorExteriorSpatialFunction);
00053 
00055   itkNewMacro(Self);
00056 
00058   typedef typename Superclass::InputType InputType;
00059 
00061   typedef typename Superclass::OutputType OutputType;
00062 
00064   typedef vnl_matrix_fixed< double, VDimension, VDimension > OrientationType;
00065 
00067   itkGetConstMacro(Center, InputType);
00068   itkSetMacro(Center, InputType);
00070 
00072   itkGetConstMacro(Axes, InputType);
00073   itkSetMacro(Axes, InputType);
00075 
00078   void SetOrientations(const OrientationType &);
00079 
00081   OutputType Evaluate(const InputType & position) const;
00082 
00083 protected:
00084   EllipsoidInteriorExteriorSpatialFunction();
00085   virtual ~EllipsoidInteriorExteriorSpatialFunction();
00086 
00087   void PrintSelf(std::ostream & os, Indent indent) const;
00088 
00089 private:
00090   EllipsoidInteriorExteriorSpatialFunction(const Self &); //purposely not
00091                                                           // implemented
00092   void operator=(const Self &);                           //purposely not
00093 
00094   // implemented
00095 
00097   InputType m_Center;
00098 
00100   InputType m_Axes;
00101 
00103   double **m_Orientations;
00104 };
00105 } // end namespace itk
00106 
00107 // Define instantiation macro for this template.
00108 #define ITK_TEMPLATE_EllipsoidInteriorExteriorSpatialFunction(_, EXPORT, TypeX, TypeY)     \
00109   namespace itk                                                                            \
00110   {                                                                                        \
00111   _( 2 ( class EXPORT EllipsoidInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 TypeX > ) ) \
00112   namespace Templates                                                                      \
00113   {                                                                                        \
00114   typedef EllipsoidInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 TypeX >                 \
00115   EllipsoidInteriorExteriorSpatialFunction##TypeY;                                       \
00116   }                                                                                        \
00117   }
00118 
00119 #if ITK_TEMPLATE_EXPLICIT
00120 #include "Templates/itkEllipsoidInteriorExteriorSpatialFunction+-.h"
00121 #endif
00122 
00123 #if ITK_TEMPLATE_TXX
00124 #include "itkEllipsoidInteriorExteriorSpatialFunction.hxx"
00125 #endif
00126 
00127 #endif
00128