X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageInfo.cxx;h=33d80cbf3551bdaae3af0b0934411d9df8e06aa6;hb=f48c960aef6e0a5a4edea516b062197db009e25f;hp=b5d363aaa6043dd2e78d0b49aabacab3e4e871b5;hpb=758de1c14c7f16d924e1a2a575d52cd3e48ec503;p=clitk.git diff --git a/tools/clitkImageInfo.cxx b/tools/clitkImageInfo.cxx index b5d363a..33d80cb 100644 --- a/tools/clitkImageInfo.cxx +++ b/tools/clitkImageInfo.cxx @@ -1,18 +1,20 @@ /*========================================================================= - -Program: clitk -Language: C++ - -Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de -l'Image). All rights reserved. See Doc/License.txt or -http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. - -This software is distributed WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + Authors belong to: + - University of LYON http://www.universite-lyon.fr/ + - Léon Bérard cancer center http://www.centreleonberard.fr + - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + + - BSD See included LICENSE.txt file + - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +===========================================================================**/ /** ================================================= * @file clitkImageInfo.cxx @@ -20,12 +22,19 @@ PURPOSE. See the above copyright notices for more information. * @date 02 Jul 2006 =================================================*/ +// itk include +#include "itkImageIOBase.h" + // clitk include #include "clitkImageInfo_ggo.h" #include "clitkIO.h" +#include "clitkImageCommon.h" +#include "clitkCommon.h" +#include "vvImageReader.h" //==================================================================== -int main(int argc, char * argv[]) { +int main(int argc, char * argv[]) +{ // init command line GGO(clitkImageInfo, args_info); @@ -34,29 +43,50 @@ int main(int argc, char * argv[]) { // check arg if (args_info.inputs_num == 0) return 0; - // read Header + // read Header for(unsigned int i=0; iSetInputFilename(args_info.inputs[i]); + r->Update(vvImageReader::IMAGE); + vtkMatrix4x4 * m = r->GetOutput()->GetTransform()[0]->GetMatrix(); + for(int i=0; i<4; i++) { + for(int j=0; j<4; j++) + std::cout << m->GetElement(i,j) << " "; + std::cout << std::endl; + } + + // inverse + m->Invert(); + for(int i=0; i<4; i++) { + for(int j=0; j<4; j++) + std::cout << m->GetElement(i,j) << " "; + std::cout << std::endl; } - } - // this is the end my friend + } + } // end for + + + // this is the end my friend return 0; } //====================================================================