X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestCopyDicom.cxx;h=f93ce53ec1068012d6f831b4a7056e4f47d676b0;hb=7e782b6c8db2851eb5710ae46d7cc0525ee203ba;hp=092e6f16c5c6f73ab933adff89fb9e9a006c8639;hpb=692f863c018c259a380e664d3608a46ec0c8bb3e;p=gdcm.git diff --git a/Example/TestCopyDicom.cxx b/Example/TestCopyDicom.cxx index 092e6f16..f93ce53e 100644 --- a/Example/TestCopyDicom.cxx +++ b/Example/TestCopyDicom.cxx @@ -6,6 +6,8 @@ #ifndef _WIN32 #include //for access, unlink +#else +#include //for _access #endif // return true if the file exists @@ -61,14 +63,14 @@ int main(int argc, char* argv[]) return 1; } } - gdcmFile *original = new gdcmFile( filename ); + gdcm::File *original = new gdcm::File( filename ); std::cout << "--- Original ----------------------" << std::endl; //original->GetHeader()->Print(); - gdcmFile *copy = new gdcmFile( output ); + gdcm::File *copy = new gdcm::File( output ); - TagDocEntryHT & Ht = original->GetHeader()->GetEntry(); + const gdcm::TagDocEntryHT & Ht = original->GetHeader()->GetTagHT(); size_t dataSize = original->GetImageDataSize(); uint8_t* imageData = original->GetImageData(); @@ -80,22 +82,22 @@ int main(int argc, char* argv[]) // (the user does NOT have to know the way we implemented the Header !) // Waiting for a 'clean' solution, I keep the method ...JPRx - gdcmDocEntry* d; + gdcm::DocEntry* d; - for (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; - if ( gdcmBinEntry* b = dynamic_cast(d) ) + if ( gdcm::BinEntry* b = dynamic_cast(d) ) { copy->GetHeader()->ReplaceOrCreateByNumber( - b->GetVoidArea(), + b->GetBinArea(), b->GetLength(), b->GetGroup(), b->GetElement(), b->GetVR() ); } - else if ( gdcmValEntry* v = dynamic_cast(d) ) + else if ( gdcm::ValEntry* v = dynamic_cast(d) ) { copy->GetHeader()->ReplaceOrCreateByNumber( v->GetValue(),