X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=itk%2FclitkRelativePositionAnalyzerFilter.h;h=3554049665cb18f0a3a3ebc6afc83490a715fa1e;hb=5bff4d89c8ca42336267c36974e9ceb6fe2ac843;hp=7d70fe79a22b9a7e096d0c07392134fde60845bc;hpb=e6e296da58762731b5ea8bc019fd2741f375b43e;p=clitk.git diff --git a/itk/clitkRelativePositionAnalyzerFilter.h b/itk/clitkRelativePositionAnalyzerFilter.h index 7d70fe7..3554049 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,17 @@ 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 virtual clitk::FilterBase, + public clitk::FilterWithAnatomicalFeatureDatabaseManagement, public itk::ImageToImageFilter { @@ -85,8 +88,28 @@ namespace clitk { itkGetConstMacro(ForegroundValue, PixelType); itkSetMacro(ForegroundValue, PixelType); + itkGetConstMacro(NumberOfBins, int); + itkSetMacro(NumberOfBins, int); + + itkGetConstMacro(NumberOfAngles, int); + itkSetMacro(NumberOfAngles, int); + + itkGetConstMacro(AreaLossTolerance, double); + itkSetMacro(AreaLossTolerance, double); + + itkGetConstMacro(SupportSize, int); + itkGetConstMacro(TargetSize, int); + itkGetConstMacro(SizeWithThreshold, int); + itkGetConstMacro(SizeWithReverseThreshold, int); + + std::vector & GetListOfInformation() { return m_ListOfInformation; } + std::vector & GetListOfOrientation() { return m_ListOfOrientation; } + // For debug void PrintOptions(); + + // Print output + void Print(std::string s=" ", std::ostream & os=std::cout); // I dont want to verify inputs information virtual void VerifyInputInformation() { } @@ -95,14 +118,28 @@ 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_NumberOfAngles; + int m_NumberOfBins; + double m_AreaLossTolerance; + int m_SupportSize; + int m_TargetSize; + int m_SizeWithReverseThreshold; + int m_SizeWithThreshold; + std::vector m_ListOfAngles; + std::vector m_ListOfInformation; + std::vector m_ListOfOrientation; + virtual void GenerateOutputInformation(); - virtual void GenerateInputRequestedRegion(); virtual void GenerateData(); typename FloatImageType::Pointer