From 71ca18ec16fc5526221d70b8c4d636b6141109d1 Mon Sep 17 00:00:00 2001 From: jpr Date: Wed, 15 Nov 2006 15:57:49 +0000 Subject: [PATCH] Print some more usefull info --- Example/AnonymizeNoLoad.cxx | 6 +++--- Example/PrintFile.cxx | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/Example/AnonymizeNoLoad.cxx b/Example/AnonymizeNoLoad.cxx index 5e66ae82..a3b44027 100644 --- a/Example/AnonymizeNoLoad.cxx +++ b/Example/AnonymizeNoLoad.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: AnonymizeNoLoad.cxx,v $ Language: C++ - Date: $Date: 2006/07/17 13:25:00 $ - Version: $Revision: 1.18 $ + Date: $Date: 2006/11/15 15:57:49 $ + Version: $Revision: 1.19 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) START_USAGE(usage) "\n AnonymizeNoLoad :\n ", "Anonymize a gdcm-parsable Dicom image even if pixels aren't gdcm readable ", - " Warning : the image is OVERWRITTEN ", + " Warning : the image is OVERWRITTEN ", " to preserve image integrity, use a copy. ", "usage: AnonymizeNoLoad {filein=inputFileName|dirin=inputDirectoryName} ", " [rubout=listOfElementsToRubOut] ", diff --git a/Example/PrintFile.cxx b/Example/PrintFile.cxx index d2cfdf58..725dca83 100644 --- a/Example/PrintFile.cxx +++ b/Example/PrintFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintFile.cxx,v $ Language: C++ - Date: $Date: 2006/08/29 15:53:09 $ - Version: $Revision: 1.82 $ + Date: $Date: 2006/11/15 15:57:49 $ + Version: $Revision: 1.83 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -333,7 +333,8 @@ errno = 0; std::cout << "Z spacing " << f->GetZSpacing() << std::endl; //------------------------------ - // Lets's get and print some usefull fields about 'Orientation' + + // Let's get and print some usefull fields about 'Orientation' // ------------------------------------------------------------ std::string strPatientPosition = @@ -371,6 +372,34 @@ errno = 0; std::cout << "ImageOrientationRET (0x0020,0x0035)= [" << strImageOrientationRET << "]" << std::endl; + std::string strImagePositionPatient = + f->GetEntryString(0x0020,0x0032); + if ( strImagePositionPatient != gdcm::GDCM_UNFOUND + && strImagePositionPatient != "" ) + std::cout << "ImagePositionPatient (0x0020,0x0032)= [" + << strImagePositionPatient << "]" << std::endl; + + std::string strImagePositionPatientRET = + f->GetEntryString(0x0020,0x0030); + if ( strImagePositionPatientRET != gdcm::GDCM_UNFOUND + && strImagePositionPatientRET != "" ) + std::cout << "ImagePositionPatientRET (0x0020,0x0030)= [" + << strImagePositionPatientRET << "]" << std::endl; + + float iop[6]; + /*bool riop = */f->GetImageOrientationPatient(iop); + float ipp[3]; + /*bool ripp = */f->GetImagePositionPatient(ipp); + + std::cout << "Image Position (0x0020,0x0032|0x0030) : " + << ipp[0] << " , " << ipp[1] << " , "<< ipp[2] + << std::endl; + std::cout << "Image Orientation (0x0020,0x0037|0x0035) : " + << iop[0] << " , " << iop[1] << " , "<< iop[2] << " , " + << iop[3] << " , " << iop[4] << " , "<< iop[5] + << std::endl; + + // Let's compute 'user friendly' results about 'Orientation' // --------------------------------------------------------- -- 2.46.1