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