Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkScalarRegionBasedLevelSetFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkScalarRegionBasedLevelSetFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-05-13 14:23:05 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __itkScalarRegionBasedLevelSetFunction_h
00019 #define __itkScalarRegionBasedLevelSetFunction_h
00020 
00021 #include "itkRegionBasedLevelSetFunction.h"
00022 #include "itkNeighborhoodIterator.h"
00023 #include "itkImageRegionConstIterator.h"
00024 
00025 namespace itk {
00026 
00027 
00063 template < class TInputImage, class TFeatureImage, class TSharedData >
00064 class ITK_EXPORT ScalarRegionBasedLevelSetFunction
00065 : public RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
00066 {
00067 public:
00068   typedef ScalarRegionBasedLevelSetFunction         Self;
00069   typedef RegionBasedLevelSetFunction<
00070     TInputImage, TFeatureImage, TSharedData >       Superclass;
00071   typedef SmartPointer<Self>                        Pointer;
00072   typedef SmartPointer<const Self>                  ConstPointer;
00073 
00074   // itkNewMacro() is purposely not provided since this is an abstract class.
00075 
00077   itkTypeMacro( ScalarRegionBasedLevelSetFunction, RegionBasedLevelSetFunction );
00078 
00079   itkStaticConstMacro( ImageDimension, unsigned int, TFeatureImage::ImageDimension );
00080 
00081   typedef typename Superclass::InputImageType         InputImageType;
00082   typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
00083   typedef typename Superclass::InputImagePointer      InputImagePointer;
00084   typedef typename Superclass::InputPixelType         InputPixelType;
00085   typedef typename Superclass::InputIndexType         InputIndexType;
00086   typedef typename Superclass::InputIndexValueType    InputIndexValueType;
00087   typedef typename Superclass::InputSizeType          InputSizeType;
00088   typedef typename Superclass::InputSizeValueType     InputSizeValueType;
00089   typedef typename Superclass::InputRegionType        InputRegionType;
00090   typedef typename Superclass::InputPointType         InputPointType;
00091 
00092   typedef typename Superclass::FeatureImageType       FeatureImageType;
00093   typedef typename FeatureImageType::ConstPointer     FeatureImageConstPointer;
00094   typedef typename Superclass::FeaturePixelType       FeaturePixelType;
00095   typedef typename Superclass::FeatureIndexType       FeatureIndexType;
00096   typedef typename Superclass::FeatureOffsetType      FeatureOffsetType;
00097 
00098   typedef typename Superclass::ScalarValueType        ScalarValueType;
00099   typedef typename Superclass::NeighborhoodType       NeighborhoodType;
00100   typedef typename Superclass::FloatOffsetType        FloatOffsetType;
00101   typedef typename Superclass::RadiusType             RadiusType;
00102   typedef typename Superclass::TimeStepType           TimeStepType;
00103   typedef typename Superclass::GlobalDataStruct       GlobalDataStruct;
00104   typedef typename Superclass::PixelType              PixelType;
00105   typedef typename Superclass::VectorType             VectorType;
00106 
00107   typedef typename Superclass::SharedDataType         SharedDataType;
00108   typedef typename Superclass::SharedDataPointer      SharedDataPointer;
00109 
00110   typedef ImageRegionIteratorWithIndex< InputImageType >      ImageIteratorType;
00111   typedef ImageRegionConstIteratorWithIndex< InputImageType > ConstImageIteratorType;
00112   typedef ImageRegionIteratorWithIndex< FeatureImageType >    FeatureImageIteratorType;
00113   typedef ImageRegionConstIterator< FeatureImageType >        ConstFeatureIteratorType;
00114 
00115   typedef std::list< unsigned int >                 ListPixelType;
00116   typedef typename ListPixelType::const_iterator    ListPixelConstIterator;
00117   typedef typename ListPixelType::iterator          ListPixelIterator;
00118   typedef Image< ListPixelType, itkGetStaticConstMacro(ImageDimension) >
00119                                                     ListImageType;
00120 
00125   void UpdatePixel( const unsigned int& idx,
00126     NeighborhoodIterator<TInputImage> &iterator,
00127     InputPixelType &newValue,
00128     bool &status );
00129 
00130 protected:
00131   ScalarRegionBasedLevelSetFunction() : Superclass(){}
00132   ~ScalarRegionBasedLevelSetFunction(){}
00133 
00134   ScalarValueType ComputeOverlapParameters( const FeatureIndexType& featIndex,
00135     ScalarValueType& product );
00136 
00137   virtual void UpdateSharedDataInsideParameters( const unsigned int& iId,
00138     const bool& iBool, const FeaturePixelType& iVal, const ScalarValueType& iH ) = 0;
00139   virtual void UpdateSharedDataOutsideParameters( const unsigned int& iId,
00140     const bool& iBool, const FeaturePixelType& iVal, const ScalarValueType& iH ) = 0;
00141 
00142 private:
00143   ScalarRegionBasedLevelSetFunction(const Self&); //purposely not implemented
00144   void operator=(const Self&); //purposely not implemented
00145 };
00146 
00147 }
00148 
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkScalarRegionBasedLevelSetFunction.txx"
00151 #endif
00152 
00153 #endif
00154 

Generated at Thu May 28 11:32:05 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000