]> Creatis software - clitk.git/commitdiff
Clear previous commits for clitkDicom2Image
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 9 Nov 2017 13:33:05 +0000 (14:33 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 9 Nov 2017 13:33:05 +0000 (14:33 +0100)
tools/clitkDicom2Image.cxx

index 1ac985e504de85c97aef1c8695a0d59cf3b84660..ffd08e8a9b9941c49585b5ec5cf05a7028cec97d 100644 (file)
@@ -236,26 +236,10 @@ int main(int argc, char * argv[])
         name << *sn << "_" << args_info.output_arg;
       outfile = name.str();
     }
-    //Check on transform
-    bool bId = true;
-    if (!image->GetTransform().empty()) {
-      for(unsigned int i=0; i<4; i++) {
-        for(unsigned int j=0; j<4; j++) {
-          double elt = image->GetTransform()[0]->GetMatrix()->GetElement(i,j);
-          if(i==j && elt!=1.) {
-            bId = false;
-          }
-          if(i!=j && elt!=0.) {
-            bId = false;
-          }
-        }
-      }
-    }
     vvImageWriter::Pointer writer = vvImageWriter::New();
     writer->SetInput(image);
-    if(!bId) {
-        writer->SetSaveTransform(true);
-    }
+    if (!image->GetTransform().empty())
+      writer->SetSaveTransform(true);
     writer->SetOutputFileName(outfile);
     writer->Update();