X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkRelativePositionAnalyzerFilter.h;h=a41df8b859ead5e1ee7333c379e3b0650278092f;hb=4958449389240b49cc03f488762a9bd52ee43e6d;hp=7d70fe79a22b9a7e096d0c07392134fde60845bc;hpb=1023d9d8de9f99a29043d54042ac45082c9a830f;p=clitk.git diff --git a/itk/clitkRelativePositionAnalyzerFilter.h b/itk/clitkRelativePositionAnalyzerFilter.h index 7d70fe7..a41df8b 100644 --- a/itk/clitkRelativePositionAnalyzerFilter.h +++ b/itk/clitkRelativePositionAnalyzerFilter.h @@ -23,6 +23,7 @@ #include "clitkFilterWithAnatomicalFeatureDatabaseManagement.h" #include "clitkFilterBase.h" #include "clitkSliceBySliceRelativePositionFilter.h" +#include "clitkRelativePositionDataBase.h" // itk #include @@ -33,15 +34,15 @@ namespace clitk { //-------------------------------------------------------------------- /* Analyze the relative position of a Target (mask image) according - to some Object, in a given Support. Indicate the main important - position of this Target according the Object. + to some Object (mask image), in a given Support (mask + image). Compute the optimal threshold allowing to remove the + maximal area from the Support without removing area belonging to + the Target. */ //-------------------------------------------------------------------- template class RelativePositionAnalyzerFilter: - public virtual FilterBase, - public clitk::FilterWithAnatomicalFeatureDatabaseManagement, public itk::ImageToImageFilter { @@ -78,6 +79,9 @@ namespace clitk { void SetInputObject(const ImageType * image); void SetInputTarget(const ImageType * image); + // Input + // supportname, objectname multiple targetname + // Options itkGetConstMacro(BackgroundValue, PixelType); itkSetMacro(BackgroundValue, PixelType); @@ -85,8 +89,28 @@ namespace clitk { itkGetConstMacro(ForegroundValue, PixelType); itkSetMacro(ForegroundValue, PixelType); + clitk::RelativePositionDirectionType & GetDirection() { return m_Direction; } + void SetDirection(clitk::RelativePositionDirectionType & d) { m_Direction = d; } + + itkGetConstMacro(NumberOfBins, int); + itkSetMacro(NumberOfBins, int); + + itkGetConstMacro(AreaLossTolerance, double); + itkSetMacro(AreaLossTolerance, double); + + itkGetConstMacro(SupportSize, int); + itkGetConstMacro(TargetSize, int); + itkGetConstMacro(SizeWithThreshold, int); + itkGetConstMacro(SizeWithReverseThreshold, int); + + itkGetConstMacro(Info, clitk::RelativePositionInformationType); + itkGetConstMacro(InfoReverse, clitk::RelativePositionInformationType); + // For debug void PrintOptions(); + + // Print output + void Print(std::ostream & os=std::cout); // I dont want to verify inputs information virtual void VerifyInputInformation() { } @@ -95,18 +119,31 @@ namespace clitk { RelativePositionAnalyzerFilter(); virtual ~RelativePositionAnalyzerFilter() {} + itkSetMacro(SupportSize, int); + itkSetMacro(TargetSize, int); + itkSetMacro(SizeWithThreshold, int); + itkSetMacro(SizeWithReverseThreshold, int); + PixelType m_BackgroundValue; PixelType m_ForegroundValue; ImagePointer m_Support; ImagePointer m_Object; ImagePointer m_Target; - + int m_NumberOfBins; + double m_AreaLossTolerance; + int m_SupportSize; + int m_TargetSize; + int m_SizeWithReverseThreshold; + int m_SizeWithThreshold; + clitk::RelativePositionDirectionType m_Direction; + clitk::RelativePositionInformationType m_Info; + clitk::RelativePositionInformationType m_InfoReverse; + virtual void GenerateOutputInformation(); - virtual void GenerateInputRequestedRegion(); virtual void GenerateData(); typename FloatImageType::Pointer - ComputeFuzzyMap(ImageType * object, ImageType * target, double angle); + ComputeFuzzyMap(ImageType * object, ImageType * target, ImageType * support, double angle); void ComputeOptimalThresholds(FloatImageType * map, ImageType * target, int bins, double tolerance,