X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractMediastinumFilter.txx;h=675718082192ea3663ada290675da3648b91a5e2;hb=595624eb4297e747630105d45017de69733caef2;hp=b3e17bf719ba32047ea1b48e91c776cf9684e257;hpb=9a67007d11721d89587c2a17397a11dc72c3120a;p=clitk.git diff --git a/segmentation/clitkExtractMediastinumFilter.txx b/segmentation/clitkExtractMediastinumFilter.txx index b3e17bf..6757180 100644 --- a/segmentation/clitkExtractMediastinumFilter.txx +++ b/segmentation/clitkExtractMediastinumFilter.txx @@ -263,6 +263,7 @@ GenerateOutputInformation() { MaskImagePointer bones_ant; MaskImagePointer bones_post; MaskImagePointType middle_AntPost_position; + middle_AntPost_position.Fill(NumericTraits::Zero); if (GetUseBones()) { this->StartNewStep("[Mediastinum] Ant/Post limits with bones"); @@ -340,18 +341,27 @@ GenerateOutputInformation() { // Generic RelativePosition processes output = this->ApplyRelativePositionList("Mediastinum", output); + //-------------------------------------------------------------------- + // FIXME --> do not put this limits here ! + /* // Step : SI limits It is better to do this limit *AFTER* the // RelativePosition to avoid some issue due to superior boundaries. this->StartNewStep("[Mediastinum] Keep inferior to CricoidCartilag"); // load Cricoid, get centroid, cut above (or below), lower bound - MaskImagePointer CricoidCartilag = this->GetAFDB()->template GetImage ("CricoidCartilag"); MaskImagePointType p; - p[0] = p[1] = p[2] = 0.0; // to avoid warning - clitk::FindExtremaPointInAGivenDirection(CricoidCartilag, - this->GetBackgroundValue(), 2, true, p); + try { + MaskImagePointer CricoidCartilag = this->GetAFDB()->template GetImage ("CricoidCartilag"); + p[0] = p[1] = p[2] = 0.0; // to avoid warning + clitk::FindExtremaPointInAGivenDirection(CricoidCartilag, + this->GetBackgroundValue(), 2, true, p); + } catch (clitk::ExceptionObject e) { + //DD("CricoidCartilag image not found, try CricoidCartilagZ"); + this->GetAFDB()->GetPoint3D("CricoidCartilagPoint", p); + } output = clitk::CropImageRemoveGreaterThan(output, 2, p[2], true, this->GetBackgroundValue()); this->template StopCurrentStep(output); + */ //-------------------------------------------------------------------- // Step: Get CCL