X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLymphStation_3A.txx;h=ba2fa621dad1995849d41fa7506d361b39dbf508;hb=f15421bdc0295516d83f7f60674158dc967c907b;hp=8bcabc593637accf432be590f9a5177c8692d804;hpb=a4f9f698dd1b5d838480c309010e6d4484f73b05;p=clitk.git diff --git a/segmentation/clitkExtractLymphStation_3A.txx b/segmentation/clitkExtractLymphStation_3A.txx index 8bcabc5..ba2fa62 100644 --- a/segmentation/clitkExtractLymphStation_3A.txx +++ b/segmentation/clitkExtractLymphStation_3A.txx @@ -5,8 +5,6 @@ void clitk::ExtractLymphStationsFilter:: ExtractStation_3A_SetDefaultValues() { - SetFuzzyThreshold("3A", "Sternum", 0.5); - SetFuzzyThreshold("3A", "SubclavianArtery", 0.5); } //-------------------------------------------------------------------- @@ -28,21 +26,14 @@ ExtractStation_3A() m_ListOfStations["3A"] = m_Working_Support; StopCurrentStep(m_Working_Support); - ExtractStation_3A_AntPost_S5(); - ExtractStation_3A_AntPost_S6(); + ExtractStation_3A_Post_Left_Limits_With_Aorta_S5_Support(); + ExtractStation_3A_Post_Limits_With_Dilated_Aorta_S6_Support(); ExtractStation_3A_AntPost_Superiorly(); ExtractStation_3A_Remove_Structures(); - - Remove_Structures("3A", "Aorta"); - Remove_Structures("3A", "SubclavianArteryLeft"); - Remove_Structures("3A", "SubclavianArteryRight"); - Remove_Structures("3A", "Thyroid"); - Remove_Structures("3A", "CommonCarotidArteryLeft"); - Remove_Structures("3A", "CommonCarotidArteryRight"); - Remove_Structures("3A", "BrachioCephalicArtery"); - - ExtractStation_3A_PostToBones(); + // Generic RelativePosition processes + m_ListOfStations["3A"] = this->ApplyRelativePositionList("Station_3A", m_ListOfStations["3A"]); + // Keep a single CCL m_ListOfStations["3A"] = clitk::SliceBySliceKeepMainCCL(m_ListOfStations["3A"], @@ -63,22 +54,11 @@ ExtractStation_3A() template void clitk::ExtractLymphStationsFilter:: -ExtractStation_3A_AntPost_S5() +ExtractStation_3A_Post_Left_Limits_With_Aorta_S5_Support() { - StartNewStep("[Station 3A] Post limits around S5"); - - // First remove post to SVC - MaskImagePointer SVC = GetAFDB()->template GetImage ("SVC"); - - // Trial in 3D -> difficulties superiorly. Stay slice by slice. - // Slice by slice not post to SVC. Use initial spacing - m_Working_Support = - clitk::SliceBySliceRelativePosition(m_Working_Support, SVC, 2, - GetFuzzyThreshold("3A", "SVC"), - "NotPostTo", true, - SVC->GetSpacing()[0], false, false); + StartNewStep("[Station 3A] Post limits in S5 support according to Aorta"); - // Consider Aorta, remove Left/Post part ; only around S5 + // Consider Aorta, remove Left/Post part ; only around S5 // Get S5 support and Aorta MaskImagePointer S5 = m_ListOfSupports["S5"]; MaskImagePointer Aorta = GetAFDB()->template GetImage ("Aorta"); @@ -142,9 +122,9 @@ ExtractStation_3A_AntPost_S5() template void clitk::ExtractLymphStationsFilter:: -ExtractStation_3A_AntPost_S6() +ExtractStation_3A_Post_Limits_With_Dilated_Aorta_S6_Support() { - StartNewStep("[Station 3A] Post limits around S6"); + StartNewStep("[Station 3A] Post limits with dilated Aorta"); // Consider Aorta MaskImagePointer Aorta = GetAFDB()->template GetImage ("Aorta"); @@ -160,12 +140,19 @@ ExtractStation_3A_AntPost_S6() radius[2] = 0; // required Aorta = clitk::Dilate(Aorta, radius, GetBackgroundValue(), GetForegroundValue(), false); + // Now, insert this image in the AFDB (but do not store on disk) + GetAFDB()->template SetImage("Aorta_Dilated_Anteriorly", "bidon", + Aorta, false); + /* // Not Post to m_Working_Support = clitk::SliceBySliceRelativePosition(m_Working_Support, Aorta, 2, GetFuzzyThreshold("3A", "Aorta"), "NotPostTo", true, Aorta->GetSpacing()[0], false, false); + + */ + StopCurrentStep(m_Working_Support); m_ListOfStations["3A"] = m_Working_Support; @@ -180,30 +167,6 @@ clitk::ExtractLymphStationsFilter:: ExtractStation_3A_AntPost_Superiorly() { StartNewStep("[Station 3A] Post limits superiorly"); - - /* - MaskImagePointer BrachioCephalicVein = GetAFDB()->template GetImage ("BrachioCephalicVein"); - MaskImagePointer BrachioCephalicArtery = GetAFDB()->template GetImage ("BrachioCephalicArtery"); - MaskImagePointer CommonCarotidArteryLeft = GetAFDB()->template GetImage ("CommonCarotidArteryLeft"); - MaskImagePointer CommonCarotidArteryRight = GetAFDB()->template GetImage ("CommonCarotidArteryRight"); - MaskImagePointer SubclavianArteryLeft = GetAFDB()->template GetImage ("SubclavianArteryLeft"); - MaskImagePointer SubclavianArteryRight = GetAFDB()->template GetImage ("SubclavianArteryRight"); - - // Not Post to -#define RP(STRUCTURE) \ - m_Working_Support = \ - clitk::SliceBySliceRelativePosition(m_Working_Support, STRUCTURE, 2, \ - 0.5, \ - "NotPostTo", true, \ - STRUCTURE->GetSpacing()[0], false, false); - - // RP(BrachioCephalicVein); - RP(BrachioCephalicArtery); - RP(CommonCarotidArteryRight); - RP(CommonCarotidArteryLeft); - RP(SubclavianArteryRight); - RP(SubclavianArteryLeft); - */ // Get or compute the binary mask that separate Ant/Post part // according to vessels @@ -236,13 +199,14 @@ void clitk::ExtractLymphStationsFilter:: ExtractStation_3A_Remove_Structures() { - Remove_Structures("3A", "Aorta"); - Remove_Structures("3A", "SubclavianArteryLeft"); - Remove_Structures("3A", "SubclavianArteryRight"); - Remove_Structures("3A", "Thyroid"); - Remove_Structures("3A", "CommonCarotidArteryLeft"); - Remove_Structures("3A", "CommonCarotidArteryRight"); - Remove_Structures("3A", "BrachioCephalicArtery"); + Remove_Structures(" 3A", "Aorta"); + Remove_Structures(" 3A", "SubclavianArteryLeft"); + Remove_Structures(" 3A", "SubclavianArteryRight"); + Remove_Structures(" 3A", "Thyroid"); + Remove_Structures(" 3A", "CommonCarotidArteryLeft"); + Remove_Structures(" 3A", "CommonCarotidArteryRight"); + Remove_Structures(" 3A", "BrachioCephalicArtery"); + // Remove_Structures("3A", "Bones"); --> should be in extractmediastinum // Remove_Structures("3A", "BrachioCephalicVein"); ? StartNewStep("[Station 3A] Remove part of BrachioCephalicVein"); @@ -297,23 +261,3 @@ ExtractStation_3A_Remove_Structures() //-------------------------------------------------------------------- -//-------------------------------------------------------------------- -template -void -clitk::ExtractLymphStationsFilter:: -ExtractStation_3A_PostToBones() -{ - StartNewStep("[Station 3A] Post limits with bones"); - - // limits with bones - MaskImagePointer Bones = GetAFDB()->template GetImage("Bones"); - m_Working_Support = - clitk::SliceBySliceRelativePosition(m_Working_Support, Bones, 2, - GetFuzzyThreshold("3A", "Bones"), "NotAntTo", - false, 3, true, false); - - StopCurrentStep(m_Working_Support); - m_ListOfStations["3A"] = m_Working_Support; -} -//-------------------------------------------------------------------- -