From: tbaudier Date: Thu, 18 Apr 2019 08:18:55 +0000 (+0200) Subject: Debug clitkNormalizeImage X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d98418e7948315cd8c6ae9a2d5452ef0b52f9827;p=clitk.git Debug clitkNormalizeImage With a image with a non-null direction matrix, it failed during min/max computation Set direction matrix to output and mask copying the input direction matrix to solve the problem --- diff --git a/tools/clitkNormalizeImageFilterGenericFilter.txx b/tools/clitkNormalizeImageFilterGenericFilter.txx index ea87733..fd62269 100644 --- a/tools/clitkNormalizeImageFilterGenericFilter.txx +++ b/tools/clitkNormalizeImageFilterGenericFilter.txx @@ -103,6 +103,7 @@ namespace clitk mask->SetRegions(input->GetLargestPossibleRegion()); mask->SetOrigin(input->GetOrigin()); mask->SetSpacing(input->GetSpacing()); + mask->SetDirection(input->GetDirection()); mask->Allocate(); mask->FillBuffer(1); } @@ -112,6 +113,7 @@ namespace clitk outputImage->SetRegions(input->GetLargestPossibleRegion()); outputImage->SetOrigin(input->GetOrigin()); outputImage->SetSpacing(input->GetSpacing()); + outputImage->SetDirection(input->GetDirection()); outputImage->Allocate(); outputImage->FillBuffer(0.0); // Set output iterator