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: 2010-02-22 23:40:23 $
00007   Version:   $Revision: 1.11 $
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 #include "itkScalarChanAndVeseLevelSetFunction.h"
00024 
00025 namespace itk
00026 {
00058 template < class TInputImage, class TFeatureImage, class TOutputImage,
00059      class TFunction=ScalarChanAndVeseLevelSetFunction< TInputImage, TFeatureImage >,
00060      class TSharedData=ITK_TYPENAME TFunction::SharedDataType,
00061      typename TIdCell = unsigned int >
00062 class ITK_EXPORT ScalarChanAndVeseSparseLevelSetImageFilter :
00063 public MultiphaseSparseFiniteDifferenceImageFilter< TInputImage, TFeatureImage,
00064   TOutputImage, TFunction, TIdCell >
00065 {
00066 public:
00067   typedef ScalarChanAndVeseSparseLevelSetImageFilter      Self;
00068   typedef MultiphaseSparseFiniteDifferenceImageFilter< TInputImage,
00069     TFeatureImage, TOutputImage, TFunction, TIdCell >     Superclass;
00070   typedef SmartPointer<Self>                              Pointer;
00071   typedef SmartPointer<const Self>                        ConstPointer;
00072 
00074   itkNewMacro( Self );
00075 
00077   itkTypeMacro( ScalarChanAndVeseSparseLevelSetImageFilter,
00078     MultiphaseSparseFiniteDifferenceImageFilter );
00079 
00080   itkStaticConstMacro( ImageDimension, unsigned int, TInputImage::ImageDimension );
00081 
00083   typedef typename Superclass::InputImageType           InputImageType;
00084   typedef typename Superclass::InputImagePointer        InputImagePointer;
00085   typedef typename Superclass::InputPointType           InputPointType;
00086   typedef typename Superclass::ValueType                ValueType;
00087   typedef typename Superclass::InputSpacingType         InputSpacingType;
00088 
00089   typedef TFeatureImage                                 FeatureImageType;
00090   typedef typename FeatureImageType::Pointer            FeatureImagePointer;
00091   typedef typename FeatureImageType::PixelType          FeaturePixelType;
00092   typedef typename FeatureImageType::IndexType          FeatureIndexType;
00093   typedef typename FeatureIndexType::IndexValueType     FeatureIndexValueType;
00094   typedef typename FeatureImageType::RegionType         FeatureRegionType;
00095 
00097   typedef TOutputImage                                  OutputImageType;
00098   typedef typename OutputImageType::IndexType           IndexType;
00099   typedef typename OutputImageType::PixelType           OutputPixelType;
00100 
00101   typedef typename Superclass::TimeStepType             TimeStepType;
00102   typedef typename Superclass::FiniteDifferenceFunctionType
00103                                                         FiniteDifferenceFunctionType;
00104 
00105   typedef typename Superclass::IdCellType               IdCellType;
00106 
00107   typedef TFunction                                     FunctionType;
00108   typedef typename FunctionType::Pointer                FunctionPtr;
00109 
00110   typedef TSharedData                                   SharedDataType;
00111   typedef typename SharedDataType::Pointer              SharedDataPointer;
00112 
00113   typedef RegionOfInterestImageFilter<
00114     FeatureImageType, FeatureImageType >                ROIFilterType;
00115   typedef typename ROIFilterType::Pointer               ROIFilterPointer;
00116 
00117 #ifdef ITK_USE_CONCEPT_CHECKING
00118 
00119   itkConceptMacro(OutputHasNumericTraitsCheck,
00120     (Concept::HasNumericTraits<OutputPixelType>) );
00121 
00123 #endif
00124 
00127   virtual void SetFeatureImage( const FeatureImagePointer f )
00128     {
00129     this->SetInput( f );
00130     }
00131 
00132 protected:
00133   ScalarChanAndVeseSparseLevelSetImageFilter()
00134     {
00135     this->SetNumberOfLayers(2); // Narrow-band usage
00136     this->m_SharedData = SharedDataType::New();
00137     }
00138 
00139   ~ScalarChanAndVeseSparseLevelSetImageFilter() {}
00140 
00141   SharedDataPointer     m_SharedData;
00142 
00143   virtual void Initialize();
00144   virtual void InitializeIteration();
00145   virtual void UpdatePixel( unsigned int functionIndex,
00146     unsigned int idx, NeighborhoodIterator< InputImageType > &iterator,
00147     ValueType &newValue, bool &status );
00148 };
00149 
00150 } //end namespace itk
00151 
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkScalarChanAndVeseSparseLevelSetImageFilter.txx"
00154 #endif
00155 
00156 #endif
00157 

Generated at Mon Jul 12 2010 19:45:03 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000