ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkFrustumSpatialFunction.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 __itkFrustumSpatialFunction_h
00019 #define __itkFrustumSpatialFunction_h
00020 
00021 #include "itkInteriorExteriorSpatialFunction.h"
00022 
00023 namespace itk
00024 {
00038 template< unsigned int VImageDimension = 3, typename TInput = Point< double, 3 > >
00039 class ITK_EXPORT FrustumSpatialFunction:
00040   public InteriorExteriorSpatialFunction< VImageDimension, TInput >
00041 {
00042 public:
00043 
00045   typedef FrustumSpatialFunction< VImageDimension, TInput >          Self;
00046   typedef InteriorExteriorSpatialFunction< VImageDimension, TInput > Superclass;
00047   typedef SmartPointer< Self >                                       Pointer;
00048   typedef SmartPointer< const Self >                                 ConstPointer;
00049 
00051   itkTypeMacro(FrustumSpatialFunction, InteriorExteriorSpatialFunction);
00052 
00054   itkNewMacro(Self);
00055 
00057   typedef typename Superclass::InputType InputType;
00058 
00060   typedef typename Superclass::OutputType OutputType;
00061 
00063   typedef enum {
00064     RotateInXZPlane = 1,
00065     RotateInYZPlane
00066     } FrustumRotationPlaneType;
00067 
00069   OutputType Evaluate(const InputType & position) const;
00070 
00072   itkGetConstMacro(Apex, InputType);
00073   itkSetMacro(Apex, InputType);
00075 
00078   itkGetConstMacro(AngleZ, double);
00079   itkSetMacro(AngleZ, double);
00081 
00083   itkGetConstMacro(ApertureAngleX, double);
00084   itkSetMacro(ApertureAngleX, double);
00086 
00088   itkGetConstMacro(ApertureAngleY, double);
00089   itkSetMacro(ApertureAngleY, double);
00091 
00093   itkGetConstMacro(TopPlane, double);
00094   itkSetMacro(TopPlane, double);
00096 
00098   itkGetConstMacro(BottomPlane, double);
00099   itkSetMacro(BottomPlane, double);
00101 
00103   itkSetMacro(RotationPlane, FrustumRotationPlaneType);
00104 protected:
00105   FrustumSpatialFunction();
00106   virtual ~FrustumSpatialFunction();
00107   void PrintSelf(std::ostream & os, Indent indent) const;
00109 
00110 private:
00111   FrustumSpatialFunction(const Self &); //purposely not implemented
00112   void operator=(const Self &);         //purposely not implemented
00113 
00115   InputType m_Apex;
00116 
00118   double m_AngleZ;
00119 
00121   double m_ApertureAngleX;
00122 
00124   double m_ApertureAngleY;
00125 
00127   double m_TopPlane;
00128 
00130   double m_BottomPlane;
00131 
00133   FrustumRotationPlaneType m_RotationPlane;
00134 };
00135 } // end namespace itk
00136 
00137 // Define instantiation macro for this template.
00138 #define ITK_TEMPLATE_FrustumSpatialFunction(_, EXPORT, TypeX, TypeY)     \
00139   namespace itk                                                          \
00140   {                                                                      \
00141   _( 2 ( class EXPORT FrustumSpatialFunction< ITK_TEMPLATE_2 TypeX > ) ) \
00142   namespace Templates                                                    \
00143   {                                                                      \
00144   typedef FrustumSpatialFunction< ITK_TEMPLATE_2 TypeX >                 \
00145   FrustumSpatialFunction##TypeY;                                       \
00146   }                                                                      \
00147   }
00148 
00149 #if ITK_TEMPLATE_EXPLICIT
00150 #include "Templates/itkFrustumSpatialFunction+-.h"
00151 #endif
00152 
00153 #if ITK_TEMPLATE_TXX
00154 #include "itkFrustumSpatialFunction.hxx"
00155 #endif
00156 
00157 #endif
00158