]> Creatis software - clitk.git/commitdiff
Debug: correct wrong flag in condition
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 22 Nov 2018 15:36:11 +0000 (16:36 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 22 Nov 2018 15:36:11 +0000 (16:36 +0100)
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

index 399168c958cfa0f916b8769879f62a50481d86e7..aa63b0489bd50505255c2610640e8bbb4615c70e 100644 (file)
@@ -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();