ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkConicShellInteriorExteriorSpatialFunction.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 __itkConicShellInteriorExteriorSpatialFunction_h
00019 #define __itkConicShellInteriorExteriorSpatialFunction_h
00020 
00021 #include "vnl/vnl_vector.h"
00022 #include "itkInteriorExteriorSpatialFunction.h"
00023 #include "itkCovariantVector.h"
00024 
00025 namespace itk
00026 {
00059 template< unsigned int VDimension = 3, typename TInput = Point< double, 3 > >
00060 class ITK_EXPORT ConicShellInteriorExteriorSpatialFunction:
00061   public InteriorExteriorSpatialFunction< VDimension, TInput >
00062 {
00063 public:
00064 
00066   typedef ConicShellInteriorExteriorSpatialFunction     Self;
00067   typedef InteriorExteriorSpatialFunction< VDimension > Superclass;
00068   typedef SmartPointer< Self >                          Pointer;
00069   typedef SmartPointer< const Self >                    ConstPointer;
00070 
00072   itkTypeMacro(ConicShellInteriorExteriorSpatialFunction,
00073                InteriorExteriorSpatialFunction);
00074 
00076   itkNewMacro(Self);
00077 
00079   typedef typename Superclass::InputType InputType;
00080 
00082   typedef typename Superclass::OutputType OutputType;
00083 
00085   typedef CovariantVector< double, VDimension > GradientType;
00086 
00088   OutputType Evaluate(const InputType & position) const;
00089 
00091   itkGetConstMacro(Origin, InputType);
00092   itkSetMacro(Origin, InputType);
00094 
00096   GradientType GetOriginGradient() { return m_OriginGradient; }
00097   void SetOriginGradient(GradientType grad);
00099 
00101   itkGetConstMacro(DistanceMin, double);
00102   itkSetMacro(DistanceMin, double);
00104 
00106   itkGetConstMacro(DistanceMax, double);
00107   itkSetMacro(DistanceMax, double);
00109 
00111   itkGetConstMacro(Epsilon, double);
00112   itkSetMacro(Epsilon, double);
00114 
00116   itkGetConstMacro(Polarity, bool);
00117   itkSetMacro(Polarity, bool);
00118 protected:
00119   ConicShellInteriorExteriorSpatialFunction();
00120   virtual ~ConicShellInteriorExteriorSpatialFunction();
00121   void PrintSelf(std::ostream & os, Indent indent) const;
00123 
00124 private:
00125   ConicShellInteriorExteriorSpatialFunction(const Self &); //not implemented
00126   void operator=(const Self &);                            //purposely not
00127 
00128   // implemented
00129 
00131   InputType m_Origin;
00132 
00134   GradientType m_OriginGradient;
00135 
00136   double m_DistanceMin;
00137   double m_DistanceMax;
00138   double m_Epsilon;
00139   bool   m_Polarity;
00140 };
00141 } // end namespace itk
00142 
00143 // Define instantiation macro for this template.
00144 #define ITK_TEMPLATE_ConicShellInteriorExteriorSpatialFunction(_, EXPORT, TypeX, TypeY)     \
00145   namespace itk                                                                             \
00146   {                                                                                         \
00147   _( 2 ( class EXPORT ConicShellInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 TypeX > ) ) \
00148   namespace Templates                                                                       \
00149   {                                                                                         \
00150   typedef ConicShellInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 TypeX >                 \
00151   ConicShellInteriorExteriorSpatialFunction##TypeY;                                       \
00152   }                                                                                         \
00153   }
00154 
00155 #if ITK_TEMPLATE_EXPLICIT
00156 #include "Templates/itkConicShellInteriorExteriorSpatialFunction+-.h"
00157 #endif
00158 
00159 #if ITK_TEMPLATE_TXX
00160 #include "itkConicShellInteriorExteriorSpatialFunction.hxx"
00161 #endif
00162 
00163 #endif
00164