X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestCopyDicom.cxx;h=b13d002e31c7e4ee7879e9ecccd314b187fb6909;hb=ee91cee9d641284ed6a410f2af286bb681829055;hp=cc42d86c58ed9c68fa7a3aabd36549e79c9d4187;hpb=1d69b92978803204089d270599133917d944c651;p=gdcm.git diff --git a/Example/TestCopyDicom.cxx b/Example/TestCopyDicom.cxx index cc42d86c..b13d002e 100644 --- a/Example/TestCopyDicom.cxx +++ b/Example/TestCopyDicom.cxx @@ -1,3 +1,20 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: TestCopyDicom.cxx,v $ + Language: C++ + Date: $Date: 2004/11/19 08:37:55 $ + Version: $Revision: 1.14 $ + + 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. + +=========================================================================*/ #include "gdcmHeader.h" #include "gdcmFile.h" #include "gdcmDocument.h" @@ -70,10 +87,12 @@ int main(int argc, char* argv[]) gdcm::File *copy = new gdcm::File( output ); - gdcm::TagDocEntryHT & Ht = original->GetHeader()->GetEntry(); + const gdcm::TagDocEntryHT & Ht = original->GetHeader()->GetTagHT(); size_t dataSize = original->GetImageDataSize(); uint8_t* imageData = original->GetImageData(); + (void)imageData; + (void)dataSize; //First of all copy the header field by field @@ -84,7 +103,7 @@ int main(int argc, char* argv[]) gdcm::DocEntry* d; - for (gdcm::TagDocEntryHT::iterator tag = Ht.begin(); tag != Ht.end(); ++tag) + for (gdcm::TagDocEntryHT::const_iterator tag = Ht.begin(); tag != Ht.end(); ++tag) { d = tag->second; d->Print(); std::cout << std::endl; @@ -120,7 +139,7 @@ int main(int argc, char* argv[]) //copy->GetImageData(); - copy->SetImageData(imageData, dataSize); + //copy->SetImageData(imageData, dataSize); std::cout << "--- Copy ----------------------" << std::endl; std::cout <