ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkScalarChanAndVeseDenseLevelSetImageFilter.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 __itkScalarChanAndVeseDenseLevelSetImageFilter_h
00019 #define __itkScalarChanAndVeseDenseLevelSetImageFilter_h
00020 
00021 #include "itkMultiphaseDenseFiniteDifferenceImageFilter.h"
00022 #include "itkRegionOfInterestImageFilter.h"
00023 #include "itkScalarChanAndVeseLevelSetFunction.h"
00024 
00025 namespace itk
00026 {
00062 template< class TInputImage, class TFeatureImage, class TOutputImage,
00063           class TFunction = ScalarChanAndVeseLevelSetFunction< TInputImage, TFeatureImage >,
00064           class TSharedData = typename TFunction::SharedDataType >
00065 class ITK_EXPORT ScalarChanAndVeseDenseLevelSetImageFilter:
00066   public MultiphaseDenseFiniteDifferenceImageFilter< TInputImage, TFeatureImage, TOutputImage,
00067                                                      TFunction >
00068 {
00069 public:
00070 
00071   typedef ScalarChanAndVeseDenseLevelSetImageFilter Self;
00072   typedef MultiphaseDenseFiniteDifferenceImageFilter< TInputImage,
00073                                                       TFeatureImage, TOutputImage,
00074                                                       TFunction >                Superclass;
00075   typedef SmartPointer< Self >       Pointer;
00076   typedef SmartPointer< const Self > ConstPointer;
00077 
00079   itkNewMacro(Self);
00080 
00082   itkTypeMacro(ScalarChanAndVeseDenseLevelSetImageFilter,
00083                MultiphaseDenseFiniteDifferenceImageFilter);
00084 
00085   itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
00086 
00088   typedef typename Superclass::InputImageType    InputImageType;
00089   typedef typename Superclass::InputImagePointer InputImagePointer;
00090   typedef typename Superclass::InputPointType    InputPointType;
00091   typedef typename Superclass::ValueType         ValueType;
00092   typedef typename InputImageType::SpacingType   InputSpacingType;
00093 
00094   typedef TFeatureImage                             FeatureImageType;
00095   typedef typename FeatureImageType::Pointer        FeatureImagePointer;
00096   typedef typename FeatureImageType::PixelType      FeaturePixelType;
00097   typedef typename FeatureImageType::IndexType      FeatureIndexType;
00098   typedef typename FeatureIndexType::IndexValueType FeatureIndexValueType;
00099   typedef typename FeatureImageType::RegionType     FeatureRegionType;
00100 
00102   typedef TOutputImage                        OutputImageType;
00103   typedef typename OutputImageType::IndexType IndexType;
00104   typedef typename OutputImageType::PixelType OutputPixelType;
00105 
00106   typedef typename Superclass::TimeStepType TimeStepType;
00107   typedef typename Superclass::FiniteDifferenceFunctionType
00108   FiniteDifferenceFunctionType;
00109 
00110   typedef TFunction                      FunctionType;
00111   typedef typename FunctionType::Pointer FunctionPointer;
00112 
00113   typedef TSharedData                      SharedDataType;
00114   typedef typename SharedDataType::Pointer SharedDataPointer;
00115 
00116   typedef RegionOfInterestImageFilter< FeatureImageType, FeatureImageType > ROIFilterType;
00117   typedef typename ROIFilterType::Pointer                                   ROIFilterPointer;
00118 
00119 #ifdef ITK_USE_CONCEPT_CHECKING
00120 
00121   itkConceptMacro( OutputHasNumericTraitsCheck,
00122                    ( Concept::HasNumericTraits< OutputPixelType > ) );
00123 
00125 #endif
00126 
00129   virtual void SetFeatureImage(const FeatureImagePointer f)
00130   {
00131     this->SetInput(f);
00132   }
00133 
00134 protected:
00135   ScalarChanAndVeseDenseLevelSetImageFilter()
00136   {
00137     this->m_SharedData = SharedDataType::New();
00138   }
00139 
00140   ~ScalarChanAndVeseDenseLevelSetImageFilter(){}
00141 
00142   SharedDataPointer m_SharedData;
00143 
00144   virtual void Initialize();
00145 
00146   virtual void InitializeIteration();
00147 
00148 private:
00149   ScalarChanAndVeseDenseLevelSetImageFilter(const Self &); //purposely not
00150                                                            // implemented
00151   void operator=(const Self &);                            //purposely not
00152 
00153   // implemented
00154 };
00155 } //end namespace itk
00156 
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkScalarChanAndVeseDenseLevelSetImageFilter.hxx"
00159 #endif
00160 
00161 #endif
00162