X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestCopyDicom.cxx;h=3689353aa348185eae3cc2f8269ff993caec710e;hb=0fd97a2f44764117b637de53e09b8a329ca133f8;hp=1effa9f67b5c87c86fa8188b3fa3a0f03cdc137a;hpb=43d88e7ca1386013ee755c4eee3dc0519d335ec3;p=gdcm.git diff --git a/Testing/TestCopyDicom.cxx b/Testing/TestCopyDicom.cxx index 1effa9f6..3689353a 100644 --- a/Testing/TestCopyDicom.cxx +++ b/Testing/TestCopyDicom.cxx @@ -9,6 +9,8 @@ #ifndef _WIN32 #include //for access, unlink +#else +#include //for _access on Win32 #endif // return true if the file exists @@ -64,10 +66,10 @@ int TestCopyDicom(int , char* []) } } - gdcmFile *original = new gdcmFile( filename ); - gdcmFile *copy = new gdcmFile( output ); + gdcm::File *original = new gdcm::File( filename ); + 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(); @@ -79,12 +81,12 @@ int TestCopyDicom(int , char* []) // (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; - if ( gdcmBinEntry* b = dynamic_cast(d) ) + if ( gdcm::BinEntry* b = dynamic_cast(d) ) { copy->GetHeader()->ReplaceOrCreateByNumber( b->GetBinArea(), @@ -93,7 +95,7 @@ int TestCopyDicom(int , char* []) b->GetElement(), b->GetVR() ); } - else if ( gdcmValEntry* v = dynamic_cast(d) ) + else if ( gdcm::ValEntry* v = dynamic_cast(d) ) { copy->GetHeader()->ReplaceOrCreateByNumber( v->GetValue(), @@ -119,7 +121,7 @@ int TestCopyDicom(int , char* []) delete original; delete copy; - copy = new gdcmFile( output ); + copy = new gdcm::File( output ); //Is the file written still gdcm parsable ? if ( !copy->GetHeader()->IsReadable() )