ITK
4.0.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 00019 #ifndef __itkLevelSetEquationLaplacianTerm_h 00020 #define __itkLevelSetEquationLaplacianTerm_h 00021 00022 #include "itkLevelSetEquationTermBase.h" 00023 #include "itkZeroFluxNeumannBoundaryCondition.h" 00024 #include "itkConstNeighborhoodIterator.h" 00025 #include "itkVector.h" 00026 #include "vnl/vnl_matrix_fixed.h" 00027 00028 namespace itk 00029 { 00038 template< class TInput, // Input image or mesh 00039 class TLevelSetContainer > 00040 class LevelSetEquationLaplacianTerm : 00041 public LevelSetEquationTermBase< TInput, TLevelSetContainer > 00042 { 00043 public: 00044 typedef LevelSetEquationLaplacianTerm Self; 00045 typedef SmartPointer< Self > Pointer; 00046 typedef SmartPointer< const Self > ConstPointer; 00047 typedef LevelSetEquationTermBase< TInput, TLevelSetContainer > 00048 Superclass; 00049 00051 itkNewMacro( Self ); 00052 00054 itkTypeMacro( LevelSetEquationLaplacianTerm, 00055 LevelSetEquationTermBase ); 00056 00057 typedef typename Superclass::InputImageType InputImageType; 00058 typedef typename Superclass::InputImagePointer InputImagePointer; 00059 typedef typename Superclass::InputPixelType InputPixelType; 00060 typedef typename Superclass::InputPixelRealType InputPixelRealType; 00061 00062 typedef typename Superclass::LevelSetContainerType LevelSetContainerType; 00063 typedef typename Superclass::LevelSetContainerPointer LevelSetContainerPointer; 00064 typedef typename Superclass::LevelSetType LevelSetType; 00065 typedef typename Superclass::LevelSetPointer LevelSetPointer; 00066 typedef typename Superclass::LevelSetOutputPixelType LevelSetOutputPixelType; 00067 typedef typename Superclass::LevelSetOutputRealType LevelSetOutputRealType; 00068 typedef typename Superclass::LevelSetInputIndexType LevelSetInputIndexType; 00069 typedef typename Superclass::LevelSetGradientType LevelSetGradientType; 00070 typedef typename Superclass::LevelSetHessianType LevelSetHessianType; 00071 typedef typename Superclass::LevelSetIdentifierType LevelSetIdentifierType; 00072 00073 typedef typename Superclass::HeavisideType HeavisideType; 00074 typedef typename Superclass::HeavisideConstPointer HeavisideConstPointer; 00075 00076 typedef typename Superclass::LevelSetDataType LevelSetDataType; 00077 00078 itkStaticConstMacro(ImageDimension, unsigned int, InputImageType::ImageDimension); 00079 00081 typedef ZeroFluxNeumannBoundaryCondition< InputImageType > DefaultBoundaryConditionType; 00082 typedef typename ConstNeighborhoodIterator< InputImageType >::RadiusType RadiusType; 00083 typedef ConstNeighborhoodIterator< InputImageType, DefaultBoundaryConditionType > NeighborhoodType; 00084 00085 typedef Vector< LevelSetOutputRealType, itkGetStaticConstMacro(ImageDimension) > NeighborhoodScalesType; 00086 00088 virtual void Update(); 00089 00091 virtual void InitializeParameters(); 00092 00094 virtual void Initialize( const LevelSetInputIndexType& ); 00095 00097 virtual void UpdatePixel( const LevelSetInputIndexType& iP, 00098 const LevelSetOutputRealType& oldValue, 00099 const LevelSetOutputRealType& newValue ); 00100 00101 protected: 00102 LevelSetEquationLaplacianTerm(); 00103 00104 virtual ~LevelSetEquationLaplacianTerm(); 00105 00108 LevelSetOutputRealType LaplacianSpeed( const LevelSetInputIndexType& iP ) const; 00109 00112 virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ); 00113 00116 virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, 00117 const LevelSetDataType& iData ); 00118 00119 private: 00120 LevelSetEquationLaplacianTerm( const Self& ); // purposely not implemented 00121 void operator = ( const Self& ); // purposely not implemented 00122 }; 00123 00124 } 00125 #ifndef ITK_MANUAL_INSTANTIATION 00126 #include "itkLevelSetEquationLaplacianTerm.hxx" 00127 #endif 00128 #endif 00129