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-05-16 12:35:12 $
00007   Version:   $Revision: 1.4 $
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, TOutputImage, TFunction, TIdCell >
00061 {
00062 public:
00063   typedef ScalarChanAndVeseSparseLevelSetImageFilter      Self;
00064   typedef MultiphaseSparseFiniteDifferenceImageFilter<
00065     TInputImage, TOutputImage, TFunction, TIdCell >       Superclass;
00066   typedef SmartPointer<Self>                              Pointer;
00067   typedef SmartPointer<const Self>                        ConstPointer;
00068 
00070   itkNewMacro( Self );
00071 
00073   itkTypeMacro( ScalarChanAndVeseSparseLevelSetImageFilter,
00074     MultiphaseSparseFiniteDifferenceImageFilter );
00075 
00076   itkStaticConstMacro( ImageDimension, unsigned int, TInputImage::ImageDimension );
00077 
00079   typedef TFeatureImage                                 FeatureImageType;
00080   typedef typename FeatureImageType::Pointer            FeatureImagePtr;
00081   typedef typename FeatureImageType::PixelType          FeaturePixelType;
00082   typedef typename FeatureImageType::IndexType          FeatureIndexType;
00083   typedef typename FeatureIndexType::IndexValueType     FeatureIndexValueType;
00084   typedef typename FeatureImageType::RegionType         FeatureRegionType;
00085 
00087   typedef typename Superclass::InputImageType           InputImageType;
00088   typedef typename Superclass::InputImagePointer        InputImagePointer;
00089   typedef typename Superclass::InputPointType           InputPointType;
00090   typedef typename Superclass::InputSpacingType         InputSpacingType;
00091 
00092   typedef typename Superclass::OutputImageType          OutputImageType;
00093   typedef typename OutputImageType::ValueType           ValueType;
00094   typedef typename OutputImageType::IndexType           IndexType;
00095   typedef typename OutputImageType::PixelType           OutputPixelType;
00096 
00097   typedef typename Superclass::TimeStepType             TimeStepType;
00098   typedef typename Superclass::FiniteDifferenceFunctionType
00099                                                         FiniteDifferenceFunctionType;
00100 
00101   typedef typename Superclass::IdCellType               IdCellType;
00102 
00103   typedef TFunction                                     FunctionType;
00104   typedef typename FunctionType::Pointer                FunctionPtr;
00105 
00106   typedef TSharedData                                   SharedDataType;
00107   typedef typename SharedDataType::Pointer              SharedDataPointer;
00108 
00109   typedef RegionOfInterestImageFilter<
00110     FeatureImageType, FeatureImageType >                ROIFilterType;
00111   typedef typename ROIFilterType::Pointer               ROIFilterPointer;
00112 
00113 
00114 #ifdef ITK_USE_CONCEPT_CHECKING
00115 
00116   itkConceptMacro(OutputHasNumericTraitsCheck,
00117     (Concept::HasNumericTraits<OutputPixelType>) );
00118 
00120 #endif
00121 
00124   virtual void SetFeatureImage(const FeatureImageType *f)
00125     {
00126     this->ProcessObject::SetNthInput( 0, const_cast< FeatureImageType *>(f) );
00127     }
00128 
00129   virtual const FeatureImageType * GetFeatureImage() const
00130     {
00131     return (static_cast< const FeatureImageType*>(this->ProcessObject::GetInput(0)));
00132     }
00133 
00134 protected:
00135   ScalarChanAndVeseSparseLevelSetImageFilter()
00136     {
00137     this->SetNumberOfLayers(5); // Narrow-band usage
00138     this->m_SharedData = SharedDataType::New();
00139     }
00140 
00141   ~ScalarChanAndVeseSparseLevelSetImageFilter() {}
00142 
00143   SharedDataPointer     m_SharedData;
00144 
00145   virtual void Initialize();
00146   virtual void InitializeIteration();
00147   virtual void UpdatePixel( unsigned int functionIndex,
00148     unsigned int idx, NeighborhoodIterator< OutputImageType > &iterator,
00149     ValueType &newValue, bool &status );
00150 };
00151 
00152 } //end namespace itk
00153 
00154 #ifndef ITK_MANUAL_INSTANTIATION
00155 #include "itkScalarChanAndVeseSparseLevelSetImageFilter.txx"
00156 #endif
00157 
00158 #endif
00159 

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