X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLymphStation_7.txx;h=7bb4643cfcae9fcd6dd11ddc1060cdfee07db359;hb=34f45c6507a3605351e265f4d5eb5b4bb31a1fa6;hp=725c852d4aee2b2588e3987559063edec4929ad8;hpb=907b0bad00cbf772fbf362879c74d673253f97bb;p=clitk.git diff --git a/segmentation/clitkExtractLymphStation_7.txx b/segmentation/clitkExtractLymphStation_7.txx index 725c852..7bb4643 100644 --- a/segmentation/clitkExtractLymphStation_7.txx +++ b/segmentation/clitkExtractLymphStation_7.txx @@ -5,38 +5,12 @@ void clitk::ExtractLymphStationsFilter:: ExtractStation_7_SetDefaultValues() { - SetFuzzyThresholdForS7("Bronchi", 0.1); - SetFuzzyThresholdForS7("LeftSuperiorPulmonaryVein", 0.3); - SetFuzzyThresholdForS7("RightSuperiorPulmonaryVein", 0.2); - SetFuzzyThresholdForS7("RightPulmonaryArtery", 0.3); - SetFuzzyThresholdForS7("LeftPulmonaryArtery", 0.5); - SetFuzzyThresholdForS7("SVC", 0.2); -} -//-------------------------------------------------------------------- - -//-------------------------------------------------------------------- -template -void -clitk::ExtractLymphStationsFilter:: -SetFuzzyThresholdForS7(std::string tag, double value) -{ - m_FuzzyThresholdForS7[tag] = value; -} -//-------------------------------------------------------------------- - - -//-------------------------------------------------------------------- -template -double -clitk::ExtractLymphStationsFilter:: -GetFuzzyThresholdForS7(std::string tag) -{ - if (m_FuzzyThresholdForS7.find(tag) != m_FuzzyThresholdForS7.end()) { - return m_FuzzyThresholdForS7[tag]; - } - else { - clitkExceptionMacro("Could not find options "+tag+" in the m_FuzzyThresholdForS7 list"); - } + SetFuzzyThreshold("7", "Bronchi", 0.1); + SetFuzzyThreshold("7", "LeftSuperiorPulmonaryVein", 0.3); + SetFuzzyThreshold("7", "RightSuperiorPulmonaryVein", 0.2); + SetFuzzyThreshold("7", "RightPulmonaryArtery", 0.3); + SetFuzzyThreshold("7", "LeftPulmonaryArtery", 0.5); + SetFuzzyThreshold("7", "SVC", 0.2); } //-------------------------------------------------------------------- @@ -158,7 +132,7 @@ ExtractStation_7_RL_Limits() m_Working_Support = clitk::SliceBySliceRelativePosition(m_Working_Support, m_LeftBronchus, 2, - GetFuzzyThresholdForS7("Bronchi"), "RightTo", + GetFuzzyThreshold("7", "Bronchi"), "RightTo", false, 3, false); StopCurrentStep(m_Working_Support); @@ -167,7 +141,7 @@ ExtractStation_7_RL_Limits() StartNewStep("[Station7] Limits with bronchus : LeftTo the right bronchus"); m_Working_Support = clitk::SliceBySliceRelativePosition(m_Working_Support, m_RightBronchus, 2, - GetFuzzyThresholdForS7("Bronchi"), "LeftTo", + GetFuzzyThreshold("7", "Bronchi"), "LeftTo", false, 3, false); StopCurrentStep(m_Working_Support); @@ -181,7 +155,7 @@ ExtractStation_7_RL_Limits() sliceRelPosFilter->SetInput(m_Working_Support); sliceRelPosFilter->SetInputObject(LeftSuperiorPulmonaryVein); sliceRelPosFilter->SetDirection(2); - sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThresholdForS7("LeftSuperiorPulmonaryVein")); + sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThreshold("7", "LeftSuperiorPulmonaryVein")); sliceRelPosFilter->AddOrientationTypeString("NotLeftTo"); sliceRelPosFilter->AddOrientationTypeString("NotAntTo"); sliceRelPosFilter->SetIntermediateSpacingFlag(true); @@ -206,7 +180,7 @@ ExtractStation_7_RL_Limits() sliceRelPosFilter->SetInput(m_Working_Support); sliceRelPosFilter->SetInputObject(RightSuperiorPulmonaryVein); sliceRelPosFilter->SetDirection(2); - sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThresholdForS7("RightSuperiorPulmonaryVein")); + sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThreshold("7", "RightSuperiorPulmonaryVein")); sliceRelPosFilter->AddOrientationTypeString("NotRightTo"); sliceRelPosFilter->AddOrientationTypeString("NotAntTo"); sliceRelPosFilter->AddOrientationTypeString("NotPostTo"); @@ -231,7 +205,7 @@ ExtractStation_7_RL_Limits() sliceRelPosFilter->SetInput(m_Working_Support); sliceRelPosFilter->SetInputObject(RightPulmonaryArtery); sliceRelPosFilter->SetDirection(2); - sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThresholdForS7("RightPulmonaryArtery")); + sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThreshold("7", "RightPulmonaryArtery")); sliceRelPosFilter->AddOrientationTypeString("NotAntTo"); sliceRelPosFilter->SetIntermediateSpacingFlag(true); sliceRelPosFilter->SetIntermediateSpacing(3); @@ -249,7 +223,7 @@ ExtractStation_7_RL_Limits() sliceRelPosFilter->SetInput(m_Working_Support); sliceRelPosFilter->SetInputObject(LeftPulmonaryArtery); sliceRelPosFilter->SetDirection(2); - sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThresholdForS7("LeftPulmonaryArtery")); + sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThreshold("7", "LeftPulmonaryArtery")); sliceRelPosFilter->AddOrientationTypeString("NotAntTo"); sliceRelPosFilter->SetIntermediateSpacingFlag(true); sliceRelPosFilter->SetIntermediateSpacing(3); @@ -266,7 +240,7 @@ ExtractStation_7_RL_Limits() sliceRelPosFilter->SetInput(m_Working_Support); sliceRelPosFilter->SetInputObject(SVC); sliceRelPosFilter->SetDirection(2); - sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThresholdForS7("SVC")); + sliceRelPosFilter->SetFuzzyThreshold(GetFuzzyThreshold("7", "SVC")); sliceRelPosFilter->AddOrientationTypeString("NotRightTo"); sliceRelPosFilter->AddOrientationTypeString("NotAntTo"); sliceRelPosFilter->SetIntermediateSpacingFlag(true); @@ -369,14 +343,14 @@ ExtractStation_7_Remove_Structures() //-------------------------------------------------------------------- StartNewStep("[Station7] remove some structures"); - Remove_Structures("AzygousVein"); - Remove_Structures("Aorta"); - Remove_Structures("Esophagus"); - Remove_Structures("RightPulmonaryArtery"); - Remove_Structures("LeftPulmonaryArtery"); - Remove_Structures("LeftSuperiorPulmonaryVein"); - Remove_Structures("PulmonaryTrunk"); - Remove_Structures("VertebralBody"); + Remove_Structures("7", "AzygousVein"); + Remove_Structures("7", "Aorta"); + Remove_Structures("7", "Esophagus"); + Remove_Structures("7", "RightPulmonaryArtery"); + Remove_Structures("7", "LeftPulmonaryArtery"); + Remove_Structures("7", "LeftSuperiorPulmonaryVein"); + Remove_Structures("7", "PulmonaryTrunk"); + Remove_Structures("7", "VertebralBody"); // END StopCurrentStep(m_Working_Support);