X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractMediastinumFilter.h;fp=segmentation%2FclitkExtractMediastinumFilter.h;h=61abdee1707a5e7ce533741d6908995ade1020d7;hb=078896a97f70a552f0dae71e3ca68fbdb9d9aa78;hp=ea7f86aace0697dcf793cf246d3aec0d97e52b53;hpb=25a1e4fa1187d00dda0c8bcce573ea02e811dbc9;p=clitk.git diff --git a/segmentation/clitkExtractMediastinumFilter.h b/segmentation/clitkExtractMediastinumFilter.h index ea7f86a..61abdee 100644 --- a/segmentation/clitkExtractMediastinumFilter.h +++ b/segmentation/clitkExtractMediastinumFilter.h @@ -27,11 +27,12 @@ namespace clitk { //-------------------------------------------------------------------- /* Try to extract the mediastinum part of a thorax CT. - Inputs : - - Patient label image - - Lungs label image - - Bones label image - - Trachea label image + Input masks needed : + - Patient + - Lungs + - Bones [Optional] + - Trachea + - VertebralBody */ //-------------------------------------------------------------------- @@ -63,6 +64,10 @@ namespace clitk { typedef typename MaskImageType::IndexType MaskImageIndexType; typedef typename MaskImageType::PointType MaskImagePointType; + typedef itk::Image MaskSliceType; + typedef typename MaskSliceType::Pointer MaskSlicePointer; + typedef typename MaskSliceType::PointType MaskSlicePointType; + /** Standard class typedefs. */ typedef itk::ImageToImageFilter Superclass; typedef ExtractMediastinumFilter Self; @@ -116,24 +121,15 @@ namespace clitk { itkSetMacro(IntermediateSpacing, double); itkGetConstMacro(IntermediateSpacing, double); - itkSetMacro(FuzzyThreshold1, double); - itkGetConstMacro(FuzzyThreshold1, double); - - itkSetMacro(FuzzyThreshold2, double); - itkGetConstMacro(FuzzyThreshold2, double); - - itkSetMacro(FuzzyThreshold3, double); - itkGetConstMacro(FuzzyThreshold3, double); - itkBooleanMacro(UseBones); itkSetMacro(UseBones, bool); itkGetConstMacro(UseBones, bool); - itkSetMacro(UpperThreshold, double); - itkGetConstMacro(UpperThreshold, double); + itkSetMacro(DistanceMaxToAnteriorPartOfTheVertebralBody, double); + itkGetConstMacro(DistanceMaxToAnteriorPartOfTheVertebralBody, double); - itkSetMacro(LowerThreshold, double); - itkGetConstMacro(LowerThreshold, double); + void SetFuzzyThreshold(std::string tag, double value); + double GetFuzzyThreshold(std::string tag); protected: ExtractMediastinumFilter(); @@ -156,15 +152,18 @@ namespace clitk { MaskImagePixelType m_BackgroundValue; MaskImagePixelType m_ForegroundValue; - typename MaskImageType::Pointer output; + MaskImagePointer output; + MaskImagePointer patient; + MaskImagePointer lung; + MaskImagePointer bones; + MaskImagePointer trachea; + std::map m_FuzzyThreshold; double m_IntermediateSpacing; - double m_FuzzyThreshold1; - double m_FuzzyThreshold2; - double m_FuzzyThreshold3; bool m_UseBones; - double m_UpperThreshold; - double m_LowerThreshold; + double m_DistanceMaxToAnteriorPartOfTheVertebralBody; + + void RemovePostPartOfVertebralBody(); std::string m_OutputMediastinumFilename;