X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FPrintFile.cxx;h=3cd654f92d9b87e9a559a6f5ea57fd2c0fb105a8;hb=9a8dd0051c00e8b43529d9b6f5172f327eec9525;hp=71a2ea9c86da0f17b72d5836b491e21ffd2a0b25;hpb=b499c7295859d9f7d25e19162b581ba67917dc69;p=gdcm.git diff --git a/Example/PrintFile.cxx b/Example/PrintFile.cxx index 71a2ea9c..3cd654f9 100644 --- a/Example/PrintFile.cxx +++ b/Example/PrintFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintFile.cxx,v $ Language: C++ - Date: $Date: 2005/11/15 10:40:45 $ - Version: $Revision: 1.71 $ + Date: $Date: 2005/11/18 11:45:34 $ + Version: $Revision: 1.72 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -351,22 +351,23 @@ int main(int argc, char *argv[]) // Let's compute 'user friendly' results about 'Orientation' // --------------------------------------------------------- - gdcm::Orientation o; + gdcm::Orientation *o = gdcm::Orientation::New(); if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND || strImageOrientationRET != gdcm::GDCM_UNFOUND ) { - gdcm::OrientationType orient = o.GetOrientationType( f ); + gdcm::OrientationType orient = o->GetOrientationType( f ); std::cout << "TypeOrientation = " << orient << " (-> " - << o.GetOrientationTypeString(orient) << " )" << std::endl; + << o->GetOrientationTypeString(orient) << " )" << std::endl; } - std::string ori = o.GetOrientation ( f ); + std::string ori = o->GetOrientation ( f ); if (ori != "\\" ) std::cout << "Orientation [" << ori << "]" << std::endl; + o->gdcm::Orientation::Delete(); //------------------------------ @@ -561,24 +562,26 @@ int main(int argc, char *argv[]) // Let's compute 'user friendly' results about 'Orientation' // --------------------------------------------------------- - gdcm::Orientation o; + gdcm::Orientation *o = gdcm::Orientation::New(); + if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND || strImageOrientationRET != gdcm::GDCM_UNFOUND ) { - gdcm::OrientationType orient = o.GetOrientationType( f ); + gdcm::OrientationType orient = o->GetOrientationType( f ); std::cout << "TypeOrientation = " << orient << " (-> " - << o.GetOrientationTypeString(orient) << " )" << std::endl; + << o->GetOrientationTypeString(orient) << " )" << std::endl; } - std::string ori = o.GetOrientation ( f ); + std::string ori = o->GetOrientation ( f ); if (ori != "\\" ) std::cout << "Orientation [" << ori << "]" << std::endl; + + o->gdcm::Orientation::Delete(); //------------------------------- - if (f->IsReadable()) std::cout <c_str()<<" is Readable"<