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