X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FexExtractCSATag.cxx;h=c642010766236ae12f71d654ff2432ee599674cb;hb=d37154e4495e1e1c18c44f6cae6ef2ff8a2891cf;hp=9cca05809b8adc8d7b0971ca5f4de2780d9974c0;hpb=7c3ae7deb1ccc2107e93bd026b9477d23923b0c2;p=gdcm.git diff --git a/Example/exExtractCSATag.cxx b/Example/exExtractCSATag.cxx index 9cca0580..c6420107 100644 --- a/Example/exExtractCSATag.cxx +++ b/Example/exExtractCSATag.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exExtractCSATag.cxx,v $ Language: C++ - Date: $Date: 2007/09/11 12:54:49 $ - Version: $Revision: 1.1 $ + Date: $Date: 2007/10/19 10:18:25 $ + Version: $Revision: 1.3 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -233,8 +233,8 @@ static equ mapping[] = { { 4 , "FD" }, { 5 , "FL" }, { 6 , "IS" }, - { 7 , "SL" }, - { 8 , "SS" }, + { 7 , "SL" }, + { 8 , "SS" }, { 9 , "UL" }, { 10 , "US" }, { 16 , "CS" }, @@ -243,7 +243,7 @@ static equ mapping[] = { { 22 , "SH" }, { 23 , "ST" }, { 25 , "UI" }, - { 27 , "UT" }, + { 27 , "UT" } }; bool check_mapping(uint32_t syngodt, const char *vr) @@ -392,7 +392,7 @@ int convertCSA(std::istream &is, File *f) sq->Delete(); f->Print( std::cout ); - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); fh->SetWriteTypeToDcmExplVR(); fh->Write("/tmp/csa2.dcm"); @@ -402,7 +402,7 @@ int convertCSA(std::istream &is, File *f) int main(int argc, char *argv[]) { - gdcm::File *f; + GDCM_NAME_SPACE::File *f; if( argc < 5 ) { @@ -417,14 +417,14 @@ int main(int argc, char *argv[]) // Read the input image. // ============================================================ - f = gdcm::File::New( ); + f = GDCM_NAME_SPACE::File::New( ); - //f->SetLoadMode(gdcm::LD_NOSEQ | gdcm::LD_NOSHADOW); + //f->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ | GDCM_NAME_SPACE::LD_NOSHADOW); f->SetFileName( fileName ); f->SetMaxSizeLoadEntry(0xffff); bool res = f->Load(); - if( gdcm::Debug::GetDebugFlag()) + if( GDCM_NAME_SPACE::Debug::GetDebugFlag()) { std::cout << "---------------------------------------------" << std::endl; f->Print(); @@ -450,16 +450,16 @@ int main(int argc, char *argv[]) std::cout << "Extracting tag: (0x" << std::hex << std::setw(4) << std::setfill('0') << group << ",0x" << std::setw(4) << std::setfill('0') << elem << ")" << std::endl; std::string dicom_tag_value = f->GetEntryString(group, elem); - if (dicom_tag_value == gdcm::GDCM_UNFOUND) + if (dicom_tag_value == GDCM_NAME_SPACE::GDCM_UNFOUND) { - gdcm::DictEntry *dictEntry = f->GetPubDict()->GetEntry( group, elem); + GDCM_NAME_SPACE::DictEntry *dictEntry = f->GetPubDict()->GetEntry( group, elem); std::cerr << "Image doesn't contain any tag: " << dictEntry->GetName() << std::endl; f->Delete(); return 1; } - gdcm::DocEntry *dicom_tag_doc = f->GetDocEntry(group, elem); - gdcm::DataEntry *dicom_tag = dynamic_cast(dicom_tag_doc); + GDCM_NAME_SPACE::DocEntry *dicom_tag_doc = f->GetDocEntry(group, elem); + GDCM_NAME_SPACE::DataEntry *dicom_tag = dynamic_cast(dicom_tag_doc); if( !dicom_tag ) { std::cerr << "Sorry DataEntry only please" << std::endl; @@ -481,7 +481,7 @@ int main(int argc, char *argv[]) std::istringstream is; is.str( std::string( (char*)dicom_tag->GetBinArea(), dicom_tag->GetLength()) ); - gdcm::convertCSA(is, f); + GDCM_NAME_SPACE::convertCSA(is, f); f->Delete();