From cc48cd96d431d3bdceaf12bbfab9908ddfb9454c Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Mon, 10 Oct 2011 14:16:20 +0200 Subject: [PATCH] Remove debug and correct slice position for CaudlaMarginOf BV --- .../clitkExtractLymphStation_Supports.txx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/segmentation/clitkExtractLymphStation_Supports.txx b/segmentation/clitkExtractLymphStation_Supports.txx index 488e95d..1fb82f8 100644 --- a/segmentation/clitkExtractLymphStation_Supports.txx +++ b/segmentation/clitkExtractLymphStation_Supports.txx @@ -8,8 +8,6 @@ void clitk::ExtractLymphStationsFilter:: ExtractStationSupports() { - DD("ExtractStationSupports"); - // Get initial Mediastinum m_Working_Support = m_Mediastinum = this->GetAFDB()->template GetImage("Mediastinum", true); @@ -204,8 +202,10 @@ Support_SupInf_S2R_S2L() MaskImagePointer BrachioCephalicVein = this->GetAFDB()->template GetImage("BrachioCephalicVein"); MaskImagePointType p; clitk::FindExtremaPointInAGivenDirection(BrachioCephalicVein, GetBackgroundValue(), 2, true, p); - // I add slightly more than a slice - double CaudalMarginOfLeftBrachiocephalicVeinZ=p[2]+ 1.1*m_Working_Support->GetSpacing()[2]; + + // I add slightly more than a slice --> NO !! + double CaudalMarginOfLeftBrachiocephalicVeinZ=p[2];//+ 1.1*m_Working_Support->GetSpacing()[2]; + this->GetAFDB()->SetDouble("CaudalMarginOfLeftBrachiocephalicVeinZ", CaudalMarginOfLeftBrachiocephalicVeinZ); MaskImagePointer S2R = clitk::CropImageRemoveLowerThan(m_Working_Support, 2, @@ -324,20 +324,13 @@ Support_SupInf_S4R_S4L() // Right part clitk::FindExtremaPointInAGivenDirection(S2R, GetBackgroundValue(), 2, true, p); - DD(p); - writeImage(S4R, "before.mha"); S4R = clitk::CropImageRemoveGreaterThan(S4R, 2, p[2], true, GetBackgroundValue()); - writeImage(S4R, "after.mha"); - // Left part clitk::FindExtremaPointInAGivenDirection(S2L, GetBackgroundValue(), 2, true, p); - DD(p); S4L = clitk::CropImageRemoveGreaterThan(S4L, 2, p[2], true, GetBackgroundValue()); - // S4R = clitk::AutoCrop(S4R, GetBackgroundValue()); - // S4L = clitk::AutoCrop(S4L, GetBackgroundValue()); // Get AzygousVein and limit according to LowerBorderAzygousVein MaskImagePointer LowerBorderAzygousVein @@ -532,7 +525,7 @@ Support_S3A() MaskImagePointType p; p[0] = p[1] = p[2] = 0.0; // to avoid warning clitk::FindExtremaPointInAGivenDirection(Sternum, GetBackgroundValue(), 2, false, p); - + p[2] += Sternum->GetSpacing()[2]; // we add one slice to stop 3A at the same slice than Sternum stop S3A = clitk::CropImageRemoveGreaterThan(S3A, 2, //m_ApexOfTheChest @@ -567,7 +560,6 @@ Support_S5() p[0] = p[1] = p[2] = 0.0; // to avoid warning clitk::FindExtremaPointInAGivenDirection(PulmonaryTrunk, GetBackgroundValue(), 2, false, p); p[2] += PulmonaryTrunk->GetSpacing()[2]; - DD(p); // Cut Sup/Inf S5 = clitk::CropImageAlongOneAxis(S5, 2, p[2], sup, true, GetBackgroundValue()); -- 2.47.1