X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestWrite.cxx;h=213042091ec09b83e88540c30e6c3834723fe3ac;hb=1184bb0a9f829f36d0aecb170427259a10c2d4e7;hp=a5c0267f2affb74513fb53caec290aa4ac0b39ac;hpb=cb74bf157e806ec76db4b26140b31e2dbb4d3501;p=gdcm.git diff --git a/Example/TestWrite.cxx b/Example/TestWrite.cxx index a5c0267f..21304209 100644 --- a/Example/TestWrite.cxx +++ b/Example/TestWrite.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestWrite.cxx,v $ Language: C++ - Date: $Date: 2005/03/02 17:22:11 $ - Version: $Revision: 1.19 $ + Date: $Date: 2005/06/15 09:54:13 $ + Version: $Revision: 1.20 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -65,7 +65,13 @@ int main(int argc, char *argv[]) std::string fileName = argv[1]; std::string mode = argv[2]; - e1 = new gdcm::File( fileName.c_str() ); + //e1 = new gdcm::File( fileName.c_str() ); + + // new style : + e1 = new gdcm::File( ); + e1->SetLoadMode(0); + e1->Load( fileName.c_str() ); + if (!e1->IsReadable()) { std::cerr << "Sorry, not a Readable DICOM / ACR File" <Print(); f1 = new gdcm::FileHelper(e1); + dataSize = f1->GetImageDataSize(); + imageData= f1->GetImageData(); + + // --- - dataSize = f1->GetImageDataSize(); std::cout <GetTransferSyntaxName(); std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" << std::endl; - -/* if ( transferSyntaxName != "Implicit VR - Little Endian" + +/* + if ( transferSyntaxName != "Implicit VR - Little Endian" && transferSyntaxName != "Explicit VR - Little Endian" && transferSyntaxName != "Deflated Explicit VR - Little Endian" && transferSyntaxName != "Explicit VR - Big Endian" @@ -111,9 +121,8 @@ int main(int argc, char *argv[]) f1->GetPixelReadConverter()->Print(); std::cout << std::endl << "===========================================" << std::endl; - }*/ - imageData= f1->GetImageData(); - + } +*/ switch (mode[0]) { case 'a' :