//-------------------------------------------------------------------- template void clitk::ExtractLymphStationsFilter:: ExtractStation_5_SetDefaultValues() { } //-------------------------------------------------------------------- //-------------------------------------------------------------------- template void clitk::ExtractLymphStationsFilter:: ExtractStation_5() { if ((!CheckForStation("5")) && (!CheckForStation("5"))) return; StartNewStep("Stations 5"); StartSubStep(); // Get the current support StartNewStep("[Station 5] Get the current 5 suppport"); m_ListOfStations["5"] = m_ListOfSupports["S5"]; StopCurrentStep(m_ListOfStations["5"]); // Generic RelativePosition processes m_ListOfStations["5"] = this->ApplyRelativePositionList("Station_5", m_ListOfStations["5"]); // Separation Ant/Post -> Like 4SL ! m_Working_Support = m_ListOfStations["5"]; ExtractStation_S4L_S5_Limits_Aorta_LeftPulmonaryArtery(-10); m_ListOfStations["5"] = m_Working_Support; // Ant limit m_Working_Support = m_ListOfStations["5"]; ExtractStation_5_Limits_AscendingAorta_Ant(); m_ListOfStations["5"] = m_Working_Support; // Keep only one single CCL by slice StartNewStep("[Station 5] Keep only one CCL by slice"); m_ListOfStations["5"] = SliceBySliceKeepMainCCL(m_ListOfStations["5"], GetBackgroundValue(), GetForegroundValue()); // AutoCrop m_ListOfStations["5"] = clitk::AutoCrop(m_ListOfStations["5"], GetBackgroundValue()); StopCurrentStep(m_ListOfStations["5"]); // Store image filenames into AFDB writeImage(m_ListOfStations["5"], "seg/Station5.mhd"); GetAFDB()->SetImageFilename("Station5", "seg/Station5.mhd"); WriteAFDB(); StopSubStep(); } //-------------------------------------------------------------------- //-------------------------------------------------------------------- template void clitk::ExtractLymphStationsFilter:: ExtractStation_5_Limits_AscendingAorta_Ant() { // ---------------------------------------------------------- StartNewStep("[Station 5] Limits with Ant part of AscendingAorta"); // Get AscendingAorta MaskImagePointer AscendingAorta = GetAFDB()->template GetImage("AscendingAorta"); // Crop and select most Ant points AscendingAorta = clitk::ResizeImageLike(AscendingAorta, m_Working_Support, GetBackgroundValue()); std::vector A; std::vector B; clitk::SliceBySliceBuildLineSegmentAccordingToExtremaPosition(AscendingAorta, GetBackgroundValue(), 2, 1, true, 0, -1, A, B); //1 mm margin // Separate according to AB lines // clitk::WriteListOfLandmarks(A, "A.txt"); // clitk::WriteListOfLandmarks(B, "B.txt"); clitk::SliceBySliceSetBackgroundFromLineSeparation(m_Working_Support, A, B, GetBackgroundValue(), 1, 10); // Keep point along axis 1 // End StopCurrentStep(m_Working_Support); } //--------------------------------------------------------------------