X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLymphStationsFilter.h;h=dd99c5fd4f8eced90f38eef544e1929417ddd802;hb=607ef9091246c288b0a1333e87d3d31ce7ee5cd7;hp=6f81423fe20cbcfdfc14921839faa48c8c631add;hpb=573d80d0f7a17607d2ee883c21c940c0ba020282;p=clitk.git diff --git a/segmentation/clitkExtractLymphStationsFilter.h b/segmentation/clitkExtractLymphStationsFilter.h index 6f81423..dd99c5f 100644 --- a/segmentation/clitkExtractLymphStationsFilter.h +++ b/segmentation/clitkExtractLymphStationsFilter.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://www.centreleonberard.fr + - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html - ===========================================================================**/ + ======================================================================-====*/ #ifndef CLITKEXTRACTLYMPHSTATIONSFILTER_H #define CLITKEXTRACTLYMPHSTATIONSFILTER_H @@ -23,6 +23,9 @@ #include "clitkFilterBase.h" #include "clitkFilterWithAnatomicalFeatureDatabaseManagement.h" +// vtk +#include + namespace clitk { //-------------------------------------------------------------------- @@ -72,6 +75,10 @@ namespace clitk { typedef itk::Image MaskSliceType; typedef typename MaskSliceType::Pointer MaskSlicePointer; + typedef typename MaskSliceType::PointType MaskSlicePointType; + typedef typename MaskSliceType::RegionType MaskSliceRegionType; + typedef typename MaskSliceType::SizeType MaskSliceSizeType; + typedef typename MaskSliceType::IndexType MaskSliceIndexType; /** ImageDimension constants */ itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension); @@ -83,25 +90,25 @@ namespace clitk { itkSetMacro(ForegroundValue, MaskImagePixelType); // Station 8 - itkSetMacro(DistanceMaxToAnteriorPartOfTheSpine, double); - itkGetConstMacro(DistanceMaxToAnteriorPartOfTheSpine, double); + // itkSetMacro(DistanceMaxToAnteriorPartOfTheSpine, double); + //itkGetConstMacro(DistanceMaxToAnteriorPartOfTheSpine, double); itkSetMacro(EsophagusDiltationForAnt, MaskImagePointType); itkGetConstMacro(EsophagusDiltationForAnt, MaskImagePointType); itkSetMacro(EsophagusDiltationForRight, MaskImagePointType); itkGetConstMacro(EsophagusDiltationForRight, MaskImagePointType); - itkSetMacro(FuzzyThresholdForS8, double); - itkGetConstMacro(FuzzyThresholdForS8, double); - itkSetMacro(InjectedThresholdForS8, double); itkGetConstMacro(InjectedThresholdForS8, double); // Station 7 - void SetFuzzyThresholdForS7(std::string tag, double value); - double GetFuzzyThresholdForS7(std::string tag); + itkGetConstMacro(S7_UseMostInferiorPartOnlyFlag, bool); + itkSetMacro(S7_UseMostInferiorPartOnlyFlag, bool); + itkBooleanMacro(S7_UseMostInferiorPartOnlyFlag); // All stations bool GetComputeStation(std::string s); void AddComputeStation(std::string station) ; + void SetFuzzyThreshold(std::string station, std::string tag, double value); + double GetFuzzyThreshold(std::string station, std::string tag); protected: ExtractLymphStationsFilter(); @@ -115,39 +122,45 @@ namespace clitk { MaskImagePointer m_Mediastinum; MaskImagePointer m_Working_Support; std::map m_ListOfStations; + std::map m_ListOfSupports; MaskImagePixelType m_BackgroundValue; MaskImagePixelType m_ForegroundValue; std::map m_ComputeStationMap; bool CheckForStation(std::string station); - void Remove_Structures(std::string s); + void Remove_Structures(std::string station, std::string s); + + // Functions common to several stations + void FindLineForS7S8Separation(MaskImagePointType & A, MaskImagePointType & B); + double FindCarinaSlicePosition(); + void FindLeftAndRightBronchi(); + + // Global parameters + typedef std::map FuzzyThresholdByStructureType; + std::map m_FuzzyThreshold; + + // Station's supports + void ExtractStationSupports(); // Station 8 - double m_DistanceMaxToAnteriorPartOfTheSpine; + // double m_DistanceMaxToAnteriorPartOfTheSpine; double m_DiaphragmInferiorLimit; double m_CarinaZ; double m_OriginOfRightMiddleLobeBronchusZ; - double m_FuzzyThresholdForS8; double m_InjectedThresholdForS8; MaskImagePointer m_Esophagus; MaskImagePointType m_EsophagusDiltationForAnt; MaskImagePointType m_EsophagusDiltationForRight; - MaskImagePointer EnlargeEsophagusDilatationRadiusInferiorly(MaskImagePointer & eso); + void ExtractStation_8(); void ExtractStation_8_SetDefaultValues(); void ExtractStation_8_SI_Limits(); - void ExtractStation_8_Post_Limits(); - void ExtractStation_8_Ant_Sup_Limits(); - void ExtractStation_8_Ant_Inf_Limits(); - void ExtractStation_8_Ant_Injected_Limits(); - void ExtractStation_8_LR_1_Limits(); - void ExtractStation_8_LR_2_Limits(); + void ExtractStation_8_Ant_Limits(); + void ExtractStation_8_Left_Sup_Limits(); + void ExtractStation_8_Left_Inf_Limits(); void ExtractStation_8_Single_CCL_Limits(); - void ExtractStation_8_LR_Limits(); void ExtractStation_8_Remove_Structures(); - void ExtractStation_8_LR_Limits_old(); - void ExtractStation_8_LR_Limits_old2(); - + // Station 3P void ExtractStation_3P(); void ExtractStation_3P_SetDefaultValues(); @@ -159,21 +172,37 @@ namespace clitk { void ExtractStation_3P_LR_sup_Limits_2(); void ExtractStation_3P_LR_inf_Limits(); + // Station 2RL + void ExtractStation_2RL(); + void ExtractStation_2RL_SetDefaultValues(); + void ExtractStation_2RL_SI_Limits(); + void ExtractStation_2RL_Ant_Limits(); + void ExtractStation_2RL_Ant_Limits2(); + void ExtractStation_2RL_Post_Limits(); + void ExtractStation_2RL_LR_Limits(); + void ExtractStation_2RL_Remove_Structures(); + void ExtractStation_2RL_SeparateRL(); + vtkSmartPointer Build3DMeshFrom2DContour(const std::vector & points); + // Station 3A void ExtractStation_3A(); void ExtractStation_3A_SetDefaultValues(); void ExtractStation_3A_SI_Limits(); void ExtractStation_3A_Ant_Limits(); + void ExtractStation_3A_Post_Limits(); // Station 7 void ExtractStation_7(); void ExtractStation_7_SetDefaultValues(); void ExtractStation_7_SI_Limits(); - void ExtractStation_7_RL_Limits(); + void ExtractStation_7_RL_Interior_Limits(); + + + void ExtractStation_7_RL_Limits_OLD(); void ExtractStation_7_Posterior_Limits(); void ExtractStation_7_Remove_Structures(); + bool m_S7_UseMostInferiorPartOnlyFlag; MaskImagePointer m_Working_Trachea; - std::map m_FuzzyThresholdForS7; MaskImagePointer m_LeftBronchus; MaskImagePointer m_RightBronchus; typedef std::vector ListOfPointsType; @@ -210,8 +239,10 @@ namespace clitk { #ifndef ITK_MANUAL_INSTANTIATION #include "clitkExtractLymphStationsFilter.txx" +#include "clitkExtractLymphStation_Supports.txx" #include "clitkExtractLymphStation_8.txx" #include "clitkExtractLymphStation_3P.txx" +#include "clitkExtractLymphStation_2RL.txx" #include "clitkExtractLymphStation_3A.txx" #include "clitkExtractLymphStation_7.txx" #include "clitkExtractLymphStation_4RL.txx"