3 //--------------------------------------------------------------------
4 template <class ImageType>
6 clitk::ExtractLymphStationsFilter<ImageType>::
7 ExtractStation_5_SetDefaultValues()
10 //--------------------------------------------------------------------
13 //--------------------------------------------------------------------
14 template <class TImageType>
16 clitk::ExtractLymphStationsFilter<TImageType>::
18 if ((!CheckForStation("5")) && (!CheckForStation("5"))) return;
20 StartNewStep("Stations 5");
23 // Get the current support
24 StartNewStep("[Station 5] Get the current 5 suppport");
25 m_ListOfStations["5"] = m_ListOfSupports["S5"];
26 StopCurrentStep<MaskImageType>(m_ListOfStations["5"]);
28 // Generic RelativePosition processes
29 m_ListOfStations["5"] = this->ApplyRelativePositionList("Station_5", m_ListOfStations["5"]);
31 // Separation Ant/Post -> Like 4SL !
32 m_Working_Support = m_ListOfStations["5"];
33 ExtractStation_S4L_S5_Limits_Aorta_LeftPulmonaryArtery(-10);
34 m_ListOfStations["5"] = m_Working_Support;
37 m_Working_Support = m_ListOfStations["5"];
38 ExtractStation_5_Limits_AscendingAorta_Ant();
39 m_ListOfStations["5"] = m_Working_Support;
41 // Keep only one single CCL by slice
42 StartNewStep("[Station 5] Keep only one CCL by slice");
43 m_ListOfStations["5"] = SliceBySliceKeepMainCCL<MaskImageType>(m_ListOfStations["5"],
45 GetForegroundValue());
48 m_ListOfStations["5"] = clitk::AutoCrop<MaskImageType>(m_ListOfStations["5"], GetBackgroundValue());
49 StopCurrentStep<MaskImageType>(m_ListOfStations["5"]);
51 // Store image filenames into AFDB
52 writeImage<MaskImageType>(m_ListOfStations["5"], "seg/Station5.mhd");
53 GetAFDB()->SetImageFilename("Station5", "seg/Station5.mhd");
58 //--------------------------------------------------------------------
61 //--------------------------------------------------------------------
62 template <class TImageType>
64 clitk::ExtractLymphStationsFilter<TImageType>::
65 ExtractStation_5_Limits_AscendingAorta_Ant()
67 // ----------------------------------------------------------
68 StartNewStep("[Station 5] Limits with Ant part of AscendingAorta");
71 MaskImagePointer AscendingAorta = GetAFDB()->template GetImage<MaskImageType>("AscendingAorta");
73 // Crop and select most Ant points
75 clitk::ResizeImageLike<MaskImageType>(AscendingAorta, m_Working_Support, GetBackgroundValue());
76 std::vector<MaskImagePointType> A;
77 std::vector<MaskImagePointType> B;
78 clitk::SliceBySliceBuildLineSegmentAccordingToExtremaPosition<MaskImageType>(AscendingAorta,
80 2, 1, true, 0, -1, A, B);
83 // Separate according to AB lines
84 // clitk::WriteListOfLandmarks<MaskImageType>(A, "A.txt");
85 // clitk::WriteListOfLandmarks<MaskImageType>(B, "B.txt");
86 clitk::SliceBySliceSetBackgroundFromLineSeparation<MaskImageType>(m_Working_Support, A, B,
88 1, 10); // Keep point along axis 1
90 StopCurrentStep<MaskImageType>(m_Working_Support);
92 //--------------------------------------------------------------------