00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkScalarRegionBasedLevelSetFunction_h
00019 #define __itkScalarRegionBasedLevelSetFunction_h
00020
00021 #include "itkRegionBasedLevelSetFunction.h"
00022 #include "itkNeighborhoodIterator.h"
00023 #include "itkImageRegionConstIterator.h"
00024
00025 namespace itk {
00026
00027
00063 template < class TInputImage, class TFeatureImage, class TSharedData >
00064 class ITK_EXPORT ScalarRegionBasedLevelSetFunction
00065 : public RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
00066 {
00067 public:
00068 typedef ScalarRegionBasedLevelSetFunction Self;
00069 typedef RegionBasedLevelSetFunction<
00070 TInputImage, TFeatureImage, TSharedData > Superclass;
00071 typedef SmartPointer<Self> Pointer;
00072 typedef SmartPointer<const Self> ConstPointer;
00073
00074
00075
00077 itkTypeMacro( ScalarRegionBasedLevelSetFunction, RegionBasedLevelSetFunction );
00078
00079 itkStaticConstMacro( ImageDimension, unsigned int, TFeatureImage::ImageDimension );
00080
00081 typedef typename Superclass::InputImageType InputImageType;
00082 typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
00083 typedef typename Superclass::InputImagePointer InputImagePointer;
00084 typedef typename Superclass::InputPixelType InputPixelType;
00085 typedef typename Superclass::InputIndexType InputIndexType;
00086 typedef typename Superclass::InputIndexValueType InputIndexValueType;
00087 typedef typename Superclass::InputSizeType InputSizeType;
00088 typedef typename Superclass::InputSizeValueType InputSizeValueType;
00089 typedef typename Superclass::InputRegionType InputRegionType;
00090 typedef typename Superclass::InputPointType InputPointType;
00091
00092 typedef typename Superclass::FeatureImageType FeatureImageType;
00093 typedef typename FeatureImageType::ConstPointer FeatureImageConstPointer;
00094 typedef typename Superclass::FeaturePixelType FeaturePixelType;
00095 typedef typename Superclass::FeatureIndexType FeatureIndexType;
00096 typedef typename Superclass::FeatureOffsetType FeatureOffsetType;
00097
00098 typedef typename Superclass::ScalarValueType ScalarValueType;
00099 typedef typename Superclass::NeighborhoodType NeighborhoodType;
00100 typedef typename Superclass::FloatOffsetType FloatOffsetType;
00101 typedef typename Superclass::RadiusType RadiusType;
00102 typedef typename Superclass::TimeStepType TimeStepType;
00103 typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
00104 typedef typename Superclass::PixelType PixelType;
00105 typedef typename Superclass::VectorType VectorType;
00106
00107 typedef typename Superclass::SharedDataType SharedDataType;
00108 typedef typename Superclass::SharedDataPointer SharedDataPointer;
00109
00110 typedef ImageRegionIteratorWithIndex< InputImageType > ImageIteratorType;
00111 typedef ImageRegionConstIteratorWithIndex< InputImageType > ConstImageIteratorType;
00112 typedef ImageRegionIteratorWithIndex< FeatureImageType > FeatureImageIteratorType;
00113 typedef ImageRegionConstIterator< FeatureImageType > ConstFeatureIteratorType;
00114
00115 typedef std::list< unsigned int > ListPixelType;
00116 typedef typename ListPixelType::const_iterator ListPixelConstIterator;
00117 typedef typename ListPixelType::iterator ListPixelIterator;
00118 typedef Image< ListPixelType, itkGetStaticConstMacro(ImageDimension) >
00119 ListImageType;
00120
00125 void UpdatePixel( const unsigned int& idx,
00126 NeighborhoodIterator<TInputImage> &iterator,
00127 InputPixelType &newValue,
00128 bool &status );
00129
00130 protected:
00131 ScalarRegionBasedLevelSetFunction() : Superclass(){}
00132 ~ScalarRegionBasedLevelSetFunction(){}
00133
00134 ScalarValueType ComputeOverlapParameters( const FeatureIndexType& featIndex,
00135 ScalarValueType& product );
00136
00137 virtual void UpdateSharedDataInsideParameters( const unsigned int& iId,
00138 const bool& iBool, const FeaturePixelType& iVal, const ScalarValueType& iH ) = 0;
00139 virtual void UpdateSharedDataOutsideParameters( const unsigned int& iId,
00140 const bool& iBool, const FeaturePixelType& iVal, const ScalarValueType& iH ) = 0;
00141
00142 private:
00143 ScalarRegionBasedLevelSetFunction(const Self&);
00144 void operator=(const Self&);
00145 };
00146
00147 }
00148
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkScalarRegionBasedLevelSetFunction.txx"
00151 #endif
00152
00153 #endif
00154