ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkDiscreteLevelSetImageBase.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 __itkDiscreteLevelSetImageBase_h
00020 #define __itkDiscreteLevelSetImageBase_h
00021 
00022 #include "itkLevelSetImageBase.h"
00023 #include "itkObjectFactory.h"
00024 #include "itkIndex.h"
00025 #include "itkImageBase.h"
00026 
00027 namespace itk
00028 {
00038 template< typename TOutput, unsigned int VDimension >
00039 class DiscreteLevelSetImageBase :
00040   public LevelSetImageBase< Index< VDimension >,
00041                        VDimension,
00042                        TOutput >
00043 {
00044 public:
00045   typedef Index< VDimension >             IndexType;
00046 
00047   typedef DiscreteLevelSetImageBase                           Self;
00048   typedef SmartPointer< Self >                                Pointer;
00049   typedef SmartPointer< const Self >                          ConstPointer;
00050   typedef LevelSetImageBase< IndexType, VDimension, TOutput > Superclass;
00051 
00053   itkTypeMacro ( DiscreteLevelSetImageBase, LevelSetImageBase );
00054 
00055   itkStaticConstMacro ( Dimension, unsigned int, Superclass::Dimension );
00056 
00057   typedef typename Superclass::InputType        InputType;
00058   typedef typename Superclass::OutputType       OutputType;
00059   typedef typename Superclass::OutputRealType   OutputRealType;
00060   typedef typename Superclass::GradientType     GradientType;
00061   typedef typename Superclass::HessianType      HessianType;
00062   typedef typename Superclass::LevelSetDataType LevelSetDataType;
00063 
00065   virtual OutputType  Evaluate( const InputType& iP ) const = 0;
00066 
00068   virtual GradientType EvaluateGradient( const InputType& iP ) const;
00069 
00071   virtual HessianType EvaluateHessian( const InputType& iP ) const;
00072 
00074   virtual OutputRealType EvaluateLaplacian( const InputType& iP ) const;
00075 
00077   virtual OutputRealType EvaluateMeanCurvature( const InputType& iP ) const;
00078 
00079   virtual GradientType EvaluateForwardGradient( const InputType& iP ) const;
00080 
00081   virtual GradientType EvaluateBackwardGradient( const InputType& iP ) const;
00082 
00084   virtual void Evaluate( const InputType& iP, LevelSetDataType& ioData ) const;
00085 
00088   virtual void EvaluateGradient( const InputType& iP, LevelSetDataType& ioData ) const;
00089 
00092   virtual void EvaluateHessian( const InputType& iP, LevelSetDataType& ioData ) const;
00093 
00096   virtual void EvaluateMeanCurvature( const InputType& iP, LevelSetDataType& ioData ) const;
00097 
00100   virtual void EvaluateLaplacian( const InputType& iP, LevelSetDataType& ioData ) const;
00101 
00104   virtual void EvaluateForwardGradient( const InputType& iP, LevelSetDataType& ioData ) const;
00105 
00108   virtual void EvaluateBackwardGradient( const InputType& iP, LevelSetDataType& ioData ) const;
00109 
00110 protected:
00111   DiscreteLevelSetImageBase();
00112 
00113   virtual ~DiscreteLevelSetImageBase();
00114 
00116   virtual void Initialize();
00117 
00119   virtual void CopyInformation(const DataObject *data);
00120 
00122   virtual void Graft( const DataObject* data );
00123 
00124 private:
00125 
00126   DiscreteLevelSetImageBase( const Self& ); // purposely not implemented
00127   void operator = ( const Self& ); // purposely not implemented
00128   };
00129 }
00130 
00131 #ifndef ITK_MANUAL_INSTANTIATION
00132 #include "itkDiscreteLevelSetImageBase.hxx"
00133 #endif
00134 
00135 #endif // __itkDiscreteLevelSetImageBase_h
00136