ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkScalarChanAndVeseLevelSetFunctionData.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 #ifndef __itkScalarChanAndVeseLevelSetFunctionData_h
00019 #define __itkScalarChanAndVeseLevelSetFunctionData_h
00020 
00021 #include "itkRegionBasedLevelSetFunctionData.h"
00022 
00023 namespace itk
00024 {
00060 template< class TInputImage, class TFeatureImage >
00061 class ScalarChanAndVeseLevelSetFunctionData:
00062   public RegionBasedLevelSetFunctionData< TInputImage, TFeatureImage >
00063 {
00064 public:
00065 
00066   typedef ScalarChanAndVeseLevelSetFunctionData                         Self;
00067   typedef RegionBasedLevelSetFunctionData< TInputImage, TFeatureImage > Superclass;
00068   typedef SmartPointer< Self >                                          Pointer;
00069   typedef SmartPointer< const Self >                                    ConstPointer;
00070 
00071   itkStaticConstMacro(ImageDimension, unsigned int, TFeatureImage::ImageDimension);
00072 
00074   itkNewMacro(Self);
00075 
00076   itkTypeMacro(ScalarChanAndVeseLevelSetFunctionData, RegionBasedLevelSetFunctionData);
00077 
00078   typedef TInputImage                                 InputImageType;
00079   typedef typename Superclass::InputImagePointer      InputImagePointer;
00080   typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
00081   typedef typename Superclass::InputPixelType         InputPixelType;
00082   typedef typename Superclass::InputRegionType        InputRegionType;
00083   typedef typename Superclass::InputSizeType          InputSizeType;
00084   typedef typename Superclass::InputSizeValueType     InputSizeValueType;
00085   typedef typename Superclass::InputSpacingType       InputSpacingType;
00086   typedef typename Superclass::InputIndexType         InputIndexType;
00087   typedef typename Superclass::InputIndexValueType    InputIndexValueType;
00088   typedef typename Superclass::InputPointType         InputPointType;
00089 
00090   typedef TFeatureImage                                 FeatureImageType;
00091   typedef typename Superclass::FeatureImagePointer      FeatureImagePointer;
00092   typedef typename Superclass::FeatureImageConstPointer FeatureImageConstPointer;
00093   typedef typename Superclass::FeaturePixelType         FeaturePixelType;
00094   typedef typename Superclass::FeatureRegionType        FeatureRegionType;
00095   typedef typename Superclass::FeatureSizeType          FeatureSizeType;
00096   typedef typename Superclass::FeatureSizeValueType     FeatureSizeValueType;
00097   typedef typename Superclass::FeatureSpacingType       FeatureSpacingType;
00098   typedef typename Superclass::FeatureIndexType         FeatureIndexType;
00099   typedef typename Superclass::FeaturePointType         FeaturePointType;
00100 
00101   double m_BackgroundConstantValues;
00102   double m_ForegroundConstantValues;
00103   double m_WeightedSumOfPixelValuesInsideLevelSet;
00104   double m_WeightedSumOfPixelValuesOutsideLevelSet;
00105 protected:
00106   ScalarChanAndVeseLevelSetFunctionData():Superclass()
00107   {
00108     m_BackgroundConstantValues = 0.;
00109     m_ForegroundConstantValues = 0.;
00110     m_WeightedSumOfPixelValuesInsideLevelSet = 0.;
00111     m_WeightedSumOfPixelValuesOutsideLevelSet = 0.;
00112   }
00113 
00114   virtual ~ScalarChanAndVeseLevelSetFunctionData() {}
00115 private:
00116   ScalarChanAndVeseLevelSetFunctionData(const Self &); //purposely not
00117                                                        // implemented
00118   void operator=(const Self &);                        //purposely not
00119                                                        // implemented
00120 };
00121 } //end namespace itk
00122 
00123 #endif
00124