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