00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkScalarChanAndVeseDenseLevelSetImageFilter_h
00019 #define __itkScalarChanAndVeseDenseLevelSetImageFilter_h
00020
00021 #include "itkMultiphaseDenseFiniteDifferenceImageFilter.h"
00022 #include "itkRegionOfInterestImageFilter.h"
00023
00024
00056 namespace itk
00057 {
00058 template < class TInputImage, class TFeatureImage, class TOutputImage, class TFunction,
00059 class TSharedData >
00060 class ITK_EXPORT ScalarChanAndVeseDenseLevelSetImageFilter:
00061 public MultiphaseDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TFunction >
00062 {
00063 public:
00064
00065 typedef ScalarChanAndVeseDenseLevelSetImageFilter Self;
00066 typedef MultiphaseDenseFiniteDifferenceImageFilter<
00067 TInputImage, TOutputImage, TFunction > Superclass;
00068 typedef SmartPointer<Self> Pointer;
00069 typedef SmartPointer<const Self> ConstPointer;
00070
00072 itkNewMacro( Self );
00073
00075 itkTypeMacro( ScalarChanAndVeseDenseLevelSetImageFilter,
00076 MultiphaseDenseFiniteDifferenceImageFilter );
00077
00078 itkStaticConstMacro( ImageDimension, unsigned int, TInputImage::ImageDimension );
00079
00081 typedef TFeatureImage FeatureImageType;
00082 typedef typename FeatureImageType::Pointer FeatureImagePointer;
00083 typedef typename FeatureImageType::PixelType FeaturePixelType;
00084 typedef typename FeatureImageType::IndexType FeatureIndexType;
00085 typedef typename FeatureIndexType::IndexValueType FeatureIndexValueType;
00086 typedef typename FeatureImageType::RegionType FeatureRegionType;
00087
00089 typedef typename Superclass::InputImageType InputImageType;
00090 typedef typename Superclass::InputImagePointer InputImagePointer;
00091 typedef typename Superclass::InputPointType InputPointType;
00092 typedef typename Superclass::InputSpacingType InputSpacingType;
00093
00094 typedef TOutputImage OutputImageType;
00095 typedef typename OutputImageType::ValueType ValueType;
00096 typedef typename OutputImageType::IndexType IndexType;
00097 typedef typename OutputImageType::PixelType OutputPixelType;
00098
00099 typedef typename Superclass::TimeStepType TimeStepType;
00100
00101 typedef typename Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType;
00102
00103 typedef TFunction FunctionType;
00104 typedef typename FunctionType::Pointer FunctionPointer;
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 ScalarChanAndVeseDenseLevelSetImageFilter()
00136 {
00137 this->m_SharedData = SharedDataType::New();
00138 }
00139 ~ScalarChanAndVeseDenseLevelSetImageFilter(){}
00140
00141 SharedDataPointer m_SharedData;
00142
00143 virtual void Initialize();
00144 virtual void InitializeIteration();
00145
00146 private:
00147 ScalarChanAndVeseDenseLevelSetImageFilter(const Self&);
00148 void operator=(const Self&);
00149 };
00150
00151 }
00152
00153 #ifndef ITK_MANUAL_INSTANTIATION
00154 #include "itkScalarChanAndVeseDenseLevelSetImageFilter.txx"
00155 #endif
00156
00157 #endif
00158