X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLymphStation_8.txx;h=fc39203ebf7ee646fbc2b169adfad864d9aabd92;hb=431fea9a7c825943b07fc4b4f3423355a5fee501;hp=75c012998366232a6be82df8c307cf87d1e7e372;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/segmentation/clitkExtractLymphStation_8.txx b/segmentation/clitkExtractLymphStation_8.txx index 75c0129..fc39203 100644 --- a/segmentation/clitkExtractLymphStation_8.txx +++ b/segmentation/clitkExtractLymphStation_8.txx @@ -1,20 +1,3 @@ -/*========================================================================= - Program: vv http://www.creatis.insa-lyon.fr/rio/vv - - Authors belong to: - - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://www.centreleonberard.fr - - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the copyright notices for more information. - - It is distributed under dual licence - - - BSD See included LICENSE.txt file - - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -===========================================================================*/ #include #include @@ -31,7 +14,7 @@ ExtractStation_8_SetDefaultValues() SetEsophagusDiltationForAnt(p); p[0] = 5; p[1] = 10; p[2] = 1; SetEsophagusDiltationForRight(p); - SetFuzzyThresholdForS8(0.5); + SetFuzzyThreshold("8", "Esophagus", 0.5); SetInjectedThresholdForS8(150); } //-------------------------------------------------------------------- @@ -180,9 +163,9 @@ ExtractStation_8_Post_Limits() // Convert 2D points in slice into 3D points std::vector vertebralAntPositions; - clitk::PointsUtils::Convert2DTo3DList(vertebralAntPositionBySlice, - VertebralBody, - vertebralAntPositions); + clitk::PointsUtils::Convert2DMapTo3DList(vertebralAntPositionBySlice, + VertebralBody, + vertebralAntPositions); // DEBUG : write list of points clitk::WriteListOfLandmarks(vertebralAntPositions, @@ -258,7 +241,7 @@ ExtractStation_8_Ant_Sup_Limits() MaskImagePointer Trachea = GetAFDB()->template GetImage("Trachea"); MaskImagePointer m_Working_Trachea = - clitk::CropImageAbove(Trachea, 2, m_CarinaZ, true, // AutoCrop + clitk::CropImageRemoveGreaterThan(Trachea, 2, m_CarinaZ, true, // AutoCrop GetBackgroundValue()); // Seprate into two main bronchi @@ -339,12 +322,12 @@ ExtractStation_8_Ant_Sup_Limits() OriginOfRightMiddleLobeBronchus->Delete(); RightBronchus = - clitk::CropImageBelow(RightBronchus, 2, + clitk::CropImageRemoveLowerThan(RightBronchus, 2, m_OriginOfRightMiddleLobeBronchusZ, true, // AutoCrop GetBackgroundValue()); LeftBronchus = - clitk::CropImageBelow(LeftBronchus, 2, + clitk::CropImageRemoveLowerThan(LeftBronchus, 2, m_OriginOfRightMiddleLobeBronchusZ, true, // AutoCrop GetBackgroundValue()); @@ -448,7 +431,7 @@ ExtractStation_8_Ant_Inf_Limits() // Crop Esophagus : keep only below the OriginOfRightMiddleLobeBronchusZ m_Esophagus = - clitk::CropImageAbove(m_Esophagus, 2, + clitk::CropImageRemoveGreaterThan(m_Esophagus, 2, m_OriginOfRightMiddleLobeBronchusZ, true, // AutoCrop GetBackgroundValue()); @@ -485,7 +468,7 @@ ExtractStation_8_Ant_Inf_Limits() relPosFilter->UniqueConnectedComponentBySliceOff(); relPosFilter->SetIntermediateSpacing(3); relPosFilter->IntermediateSpacingFlagOn(); - relPosFilter->SetFuzzyThreshold(GetFuzzyThresholdForS8()); + relPosFilter->SetFuzzyThreshold(GetFuzzyThreshold("8", "Esophagus")); relPosFilter->RemoveObjectFlagOff(); // Do not exclude here because it is dilated relPosFilter->CombineWithOrFlagOff(); // NO ! relPosFilter->IgnoreEmptySliceObjectFlagOn(); @@ -866,7 +849,7 @@ ExtractStation_8_LR_Limits_old2() clitk::ComputeCentroids(eso_slices[i], GetBackgroundValue(), c); if (c.size() >1) { eso_slices[i] = - clitk::CropImageAbove(eso_slices[i], 1, c[1][1], false, GetBackgroundValue()); + clitk::CropImageRemoveGreaterThan(eso_slices[i], 1, c[1][1], false, GetBackgroundValue()); eso_slices[i] = clitk::ResizeImageLike(eso_slices[i], aorta_slices[i], GetBackgroundValue()); // writeImage(eso_slices[i], "eso-slice-"+toString(i)+".mhd"); @@ -1057,7 +1040,7 @@ ExtractStation_8_LR_Limits() // Crop the vertebralbody below this most post line vert_slices[j] = - clitk::CropImageAbove(vert_slices[j], 1, sp_MostAntVertebralBody[1], false, GetBackgroundValue()); + clitk::CropImageRemoveGreaterThan(vert_slices[j], 1, sp_MostAntVertebralBody[1], false, GetBackgroundValue()); vert_slices[j] = clitk::ResizeImageLike(vert_slices[j], aorta_slices[i], GetBackgroundValue()); // writeImage(vert_slices[i], "vert-slice-"+toString(i)+".mhd"); @@ -1148,8 +1131,8 @@ ExtractStation_8_Remove_Structures() //-------------------------------------------------------------------- StartNewStep("[Station8] remove some structures"); - Remove_Structures("Aorta"); - Remove_Structures("Esophagus"); + Remove_Structures("8", "Aorta"); + Remove_Structures("8", "Esophagus"); // END StopCurrentStep(m_Working_Support); @@ -1178,7 +1161,7 @@ EnlargeEsophagusDilatationRadiusInferiorly(MaskImagePointer & Esophagus) clitk::FindExtremaPointInAGivenDirection(Esophagus, GetBackgroundValue(), 2, true, pt); DD(pt); Esophagus = - clitk::CropImageBelow(Esophagus, 2, + clitk::CropImageRemoveLowerThan(Esophagus, 2, pt[2], false, // AutoCrop GetBackgroundValue());