X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLymphStation_Supports.txx;h=1fb82f86b5a6e555e12c8db81e8eff8a83eaa9c8;hb=0b1c9262d530d56a91c59a960a4411068189cf0c;hp=488e95d072d6a431bf22559ccd497e6a9392ad36;hpb=42e050104aebe7830f2111d096f0dd6673987d1e;p=clitk.git 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());