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 00019 #ifndef __itkMalcolmSparseLevelSetImage_h 00020 #define __itkMalcolmSparseLevelSetImage_h 00021 00022 #include "itkImage.h" 00023 #include "itkLevelSetSparseImageBase.h" 00024 00025 #include "itkLabelObject.h" 00026 #include "itkLabelMap.h" 00027 00028 namespace itk 00029 { 00040 template< unsigned int VDimension > 00041 class MalcolmSparseLevelSetImage : 00042 public LevelSetSparseImageBase< int8_t, VDimension > 00043 { 00044 public: 00045 typedef MalcolmSparseLevelSetImage Self; 00046 typedef SmartPointer< Self > Pointer; 00047 typedef SmartPointer< const Self > ConstPointer; 00048 typedef LevelSetSparseImageBase< int8_t, VDimension > Superclass; 00049 00051 itkNewMacro(Self); 00052 00054 itkTypeMacro(MalcolmSparseLevelSetImage, LevelSetSparseImageBase); 00055 00056 itkStaticConstMacro ( Dimension, unsigned int, VDimension ); 00057 00058 typedef typename Superclass::InputType InputType; 00059 typedef typename Superclass::OutputType OutputType; 00060 typedef typename Superclass::OutputRealType OutputRealType; 00061 typedef typename Superclass::GradientType GradientType; 00062 typedef typename Superclass::HessianType HessianType; 00063 typedef typename Superclass::LevelSetDataType LevelSetDataType; 00064 00065 typedef typename Superclass::LayerIdType LayerIdType; 00066 typedef typename Superclass::LabelObjectType LabelObjectType; 00067 typedef typename Superclass::LabelObjectPointer LabelObjectPointer; 00068 typedef typename Superclass::LabelObjectLengthType LabelObjectLengthType; 00069 typedef typename Superclass::LabelObjectLineType LabelObjectLineType; 00070 00071 typedef typename Superclass::LabelMapType LabelMapType; 00072 typedef typename Superclass::LabelMapPointer LabelMapPointer; 00073 typedef typename Superclass::RegionType RegionType; 00074 00075 typedef typename Superclass::LayerType LayerType; 00076 typedef typename Superclass::LayerIterator LayerIterator; 00077 typedef typename Superclass::LayerConstIterator LayerConstIterator; 00078 00079 typedef typename Superclass::LayerMapType LayerMapType; 00080 typedef typename Superclass::LayerMapIterator LayerMapIterator; 00081 typedef typename Superclass::LayerMapConstIterator LayerMapConstIterator; 00082 00084 using Superclass::Evaluate; 00085 virtual OutputType Evaluate( const InputType& iP ) const; 00086 00088 virtual HessianType EvaluateHessian( const InputType& iP ) const; 00089 00091 virtual OutputRealType EvaluateLaplacian( const InputType& iP ) const; 00092 00094 virtual OutputRealType EvaluateMeanCurvature( const InputType& iP ) const; 00095 00096 virtual void EvaluateHessian( const InputType& iP, LevelSetDataType& ioData ) const; 00097 virtual void EvaluateLaplacian( const InputType& iP, LevelSetDataType& ioData ) const; 00098 virtual void EvaluateMeanCurvature( const InputType& iP, LevelSetDataType& ioData ) const; 00099 00100 static inline LayerIdType MinusOneLayer() { return -1; } 00101 static inline LayerIdType ZeroLayer() { return 0; } 00102 static inline LayerIdType PlusOneLayer() { return 1; } 00103 00104 protected: 00105 00106 MalcolmSparseLevelSetImage(); 00107 00108 virtual ~MalcolmSparseLevelSetImage(); 00109 00111 virtual void InitializeLayers(); 00112 00113 virtual void InitializeInternalLabelList(); 00114 00115 private: 00116 MalcolmSparseLevelSetImage( const Self& ); //purposely not implemented 00117 void operator = ( const Self& ); //purposely not implemented 00118 }; 00119 } 00120 #ifndef ITK_MANUAL_INSTANTIATION 00121 #include "itkMalcolmSparseLevelSetImage.hxx" 00122 #endif 00123 00124 #endif // __itkMalcolmSparseLevelSetImage_h 00125