From: tbaudier Date: Thu, 9 Nov 2017 13:33:05 +0000 (+0100) Subject: Clear previous commits for clitkDicom2Image X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=38df4d1b1ea8396c225e35131eb212e02377ea45;p=clitk.git Clear previous commits for clitkDicom2Image --- 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();