From b7b8f2b040d1772c30c34653ee3fe0c27bc8fa71 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Thu, 22 Nov 2018 16:36:11 +0100 Subject: [PATCH] Debug: correct wrong flag in condition When the flag patientSystem was introduced in clitkDicom2Image to save the patient matrix, the flag to check the tool has to compute this matrix was not correct --- tools/clitkDicom2Image.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/clitkDicom2Image.cxx b/tools/clitkDicom2Image.cxx index 399168c..aa63b04 100644 --- a/tools/clitkDicom2Image.cxx +++ b/tools/clitkDicom2Image.cxx @@ -91,7 +91,7 @@ int main(int argc, char * argv[]) series_numbers.insert(series_number); theorigin[series_number] = gdcm::ImageHelper::GetOriginValue(hreader.GetFile()); theorientation[series_number] = gdcm::ImageHelper::GetDirectionCosinesValue(hreader.GetFile()); - if (args_info.extract_series_flag) { + if (args_info.patientSystem_flag) { double n1 = theorientation[series_number][1]*theorientation[series_number][5]- theorientation[series_number][2]*theorientation[series_number][4]; double n2 = theorientation[series_number][3]*theorientation[series_number][2]- @@ -241,7 +241,7 @@ int main(int argc, char * argv[]) } vvImageWriter::Pointer writer = vvImageWriter::New(); writer->SetInput(image); - if (args_info.extract_series_flag && !image->GetTransform().empty()) + if (args_info.patientSystem_flag && !image->GetTransform().empty()) writer->SetSaveTransform(true); writer->SetOutputFileName(outfile); writer->Update(); -- 2.45.0