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

itkScalarChanAndVeseSparseLevelSetImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkScalarChanAndVeseSparseLevelSetImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-07-29 15:14:15 $
00007   Version:   $Revision: 1.8 $
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 __itkScalarChanAndVeseSparseLevelSetImageFilter_h
00019 #define __itkScalarChanAndVeseSparseLevelSetImageFilter_h
00020 
00021 #include "itkMultiphaseSparseFiniteDifferenceImageFilter.h"
00022 #include "itkRegionOfInterestImageFilter.h"
00023 
00055 namespace itk
00056 {
00057 template < class TInputImage, class TFeatureImage, class TOutputImage, class TFunction,
00058   class TSharedData, typename TIdCell = unsigned int >
00059 class ITK_EXPORT ScalarChanAndVeseSparseLevelSetImageFilter :
00060 public MultiphaseSparseFiniteDifferenceImageFilter< TInputImage, TFeatureImage,
00061   TOutputImage, TFunction, TIdCell >
00062 {
00063 public:
00064   typedef ScalarChanAndVeseSparseLevelSetImageFilter      Self;
00065   typedef MultiphaseSparseFiniteDifferenceImageFilter< TInputImage,
00066     TFeatureImage, TOutputImage, TFunction, TIdCell >     Superclass;
00067   typedef SmartPointer<Self>                              Pointer;
00068   typedef SmartPointer<const Self>                        ConstPointer;
00069 
00071   itkNewMacro( Self );
00072 
00074   itkTypeMacro( ScalarChanAndVeseSparseLevelSetImageFilter,
00075     MultiphaseSparseFiniteDifferenceImageFilter );
00076 
00077   itkStaticConstMacro( ImageDimension, unsigned int, TInputImage::ImageDimension );
00078 
00080   typedef typename Superclass::InputImageType           InputImageType;
00081   typedef typename Superclass::InputImagePointer        InputImagePointer;
00082   typedef typename Superclass::InputPointType           InputPointType;
00083   typedef typename Superclass::ValueType                ValueType;
00084   typedef typename Superclass::InputSpacingType         InputSpacingType;
00085 
00086   typedef TFeatureImage                                 FeatureImageType;
00087   typedef typename FeatureImageType::Pointer            FeatureImagePointer;
00088   typedef typename FeatureImageType::PixelType          FeaturePixelType;
00089   typedef typename FeatureImageType::IndexType          FeatureIndexType;
00090   typedef typename FeatureIndexType::IndexValueType     FeatureIndexValueType;
00091   typedef typename FeatureImageType::RegionType         FeatureRegionType;
00092 
00094   typedef TOutputImage                                  OutputImageType;
00095   typedef typename OutputImageType::IndexType           IndexType;
00096   typedef typename OutputImageType::PixelType           OutputPixelType;
00097 
00098   typedef typename Superclass::TimeStepType             TimeStepType;
00099   typedef typename Superclass::FiniteDifferenceFunctionType
00100                                                         FiniteDifferenceFunctionType;
00101 
00102   typedef typename Superclass::IdCellType               IdCellType;
00103 
00104   typedef TFunction                                     FunctionType;
00105   typedef typename FunctionType::Pointer                FunctionPtr;
00106 
00107   typedef TSharedData                                   SharedDataType;
00108   typedef typename SharedDataType::Pointer              SharedDataPointer;
00109 
00110   typedef RegionOfInterestImageFilter<
00111     FeatureImageType, FeatureImageType >                ROIFilterType;
00112   typedef typename ROIFilterType::Pointer               ROIFilterPointer;
00113 
00114 #ifdef ITK_USE_CONCEPT_CHECKING
00115 
00116   itkConceptMacro(OutputHasNumericTraitsCheck,
00117     (Concept::HasNumericTraits<OutputPixelType>) );
00118 
00120 #endif
00121 
00124   virtual void SetFeatureImage( const FeatureImagePointer f )
00125     {
00126     this->SetInput( f );
00127     }
00128 
00129 protected:
00130   ScalarChanAndVeseSparseLevelSetImageFilter()
00131     {
00132     this->SetNumberOfLayers(2); // Narrow-band usage
00133     this->m_SharedData = SharedDataType::New();
00134     }
00135 
00136   ~ScalarChanAndVeseSparseLevelSetImageFilter() {}
00137 
00138   SharedDataPointer     m_SharedData;
00139 
00140   virtual void Initialize();
00141   virtual void InitializeIteration();
00142   virtual void UpdatePixel( unsigned int functionIndex,
00143     unsigned int idx, NeighborhoodIterator< InputImageType > &iterator,
00144     ValueType &newValue, bool &status );
00145 };
00146 
00147 } //end namespace itk
00148 
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkScalarChanAndVeseSparseLevelSetImageFilter.txx"
00151 #endif
00152 
00153 #endif
00154 

Generated at Tue Sep 15 04:46:45 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000