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 __itkGaussianDerivativeSpatialFunction_h 00019 #define __itkGaussianDerivativeSpatialFunction_h 00020 00021 #include "itkSpatialFunction.h" 00022 #include "itkFixedArray.h" 00023 00024 namespace itk 00025 { 00041 template< typename TOutput = double, 00042 unsigned int VImageDimension = 3, 00043 typename TInput = Point< double, VImageDimension > > 00044 class ITK_EXPORT GaussianDerivativeSpatialFunction:public SpatialFunction< TOutput, VImageDimension, TInput > 00045 { 00046 public: 00048 typedef GaussianDerivativeSpatialFunction Self; 00049 typedef SpatialFunction< TOutput, VImageDimension, TInput > Superclass; 00050 typedef SmartPointer< Self > Pointer; 00051 typedef SmartPointer< const Self > ConstPointer; 00052 00054 itkNewMacro(Self); 00055 00057 itkTypeMacro(GaussianDerivativeSpatialFunction, SpatialFunction); 00058 00060 typedef typename Superclass::InputType InputType; 00061 00063 typedef typename Superclass::OutputType OutputType; 00064 00066 typedef FixedArray< double, VImageDimension > ArrayType; 00067 00069 typedef Vector< double, VImageDimension > VectorType; 00070 00074 OutputType Evaluate(const TInput & position) const; 00075 00077 VectorType EvaluateVector(const TInput & position) const; 00078 00080 itkSetMacro(Scale, double); 00081 itkGetConstMacro(Scale, double); 00082 itkSetMacro(Normalized, bool); 00083 itkGetConstMacro(Normalized, bool); 00084 itkSetMacro(Sigma, ArrayType); 00085 itkGetConstMacro(Sigma, ArrayType); 00086 itkSetMacro(Mean, ArrayType); 00087 itkGetConstMacro(Mean, ArrayType); 00088 itkSetMacro(Direction, unsigned int); 00089 itkGetConstMacro(Direction, unsigned int); 00090 protected: 00091 GaussianDerivativeSpatialFunction(); 00092 virtual ~GaussianDerivativeSpatialFunction(); 00093 void PrintSelf(std::ostream & os, Indent indent) const; 00095 00096 private: 00097 GaussianDerivativeSpatialFunction(const Self &); //purposely not implemented 00098 void operator=(const Self &); //purposely not implemented 00099 00101 mutable unsigned int m_Direction; 00102 00104 ArrayType m_Sigma; 00105 00107 ArrayType m_Mean; 00108 00110 double m_Scale; 00111 00113 bool m_Normalized; 00114 }; 00115 } // end namespace itk 00116 00117 // Define instantiation macro for this template. 00118 #define ITK_TEMPLATE_GaussianDerivativeSpatialFunction(_, EXPORT, TypeX, TypeY) \ 00119 namespace itk \ 00120 { \ 00121 _( 3 ( class EXPORT GaussianDerivativeSpatialFunction< ITK_TEMPLATE_3 TypeX > ) ) \ 00122 namespace Templates \ 00123 { \ 00124 typedef GaussianDerivativeSpatialFunction< ITK_TEMPLATE_3 TypeX > \ 00125 GaussianDerivativeSpatialFunction##TypeY; \ 00126 } \ 00127 } 00128 00129 #if ITK_TEMPLATE_EXPLICIT 00130 #include "Templates/itkGaussianDerivativeSpatialFunction+-.h" 00131 #endif 00132 00133 #if ITK_TEMPLATE_TXX 00134 #include "itkGaussianDerivativeSpatialFunction.hxx" 00135 #endif 00136 00137 #endif 00138