From 38df4d1b1ea8396c225e35131eb212e02377ea45 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Thu, 9 Nov 2017 14:33:05 +0100 Subject: [PATCH] Clear previous commits for clitkDicom2Image --- tools/clitkDicom2Image.cxx | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tools/clitkDicom2Image.cxx b/tools/clitkDicom2Image.cxx index 1ac985e..ffd08e8 100644 --- a/tools/clitkDicom2Image.cxx +++ b/tools/clitkDicom2Image.cxx @@ -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(); -- 2.47.1