Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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);
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 }
00151
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkScalarChanAndVeseSparseLevelSetImageFilter.txx"
00154 #endif
00155
00156 #endif
00157