X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=Example%2FWriteDicom.cxx;h=e450f33f0689307afbc75561dc2353682d72af40;hb=1ce6ae86daabc8b64c9309acce4ecf137ee79f07;hp=1ca973429d1be157dfdb475524c4a099b8e82a70;hpb=c094e185dd6404df031524ccae8e1b51e3b84871;p=gdcm.git diff --git a/Example/WriteDicom.cxx b/Example/WriteDicom.cxx index 1ca97342..e450f33f 100644 --- a/Example/WriteDicom.cxx +++ b/Example/WriteDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: WriteDicom.cxx,v $ Language: C++ - Date: $Date: 2005/01/21 11:40:53 $ - Version: $Revision: 1.12 $ + Date: $Date: 2005/01/25 15:44:22 $ + Version: $Revision: 1.15 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -39,15 +39,15 @@ int main(int argc, char* argv[]) // We assume that DICOM fields of second file actually exists : - std::string nbFrames = f2->GetFile()->GetEntry(0x0028, 0x0008); + std::string nbFrames = f2->GetFile()->GetEntryValue(0x0028, 0x0008); if(nbFrames != "gdcm::Unfound") { - f1->GetFile()->ReplaceOrCreate( nbFrames, 0x0028, 0x0008); + f1->GetFile()->InsertValEntry( nbFrames, 0x0028, 0x0008); } - f1->GetFile()->ReplaceOrCreate( - f2->GetFile()->GetEntry(0x0028, 0x0010), 0x0028, 0x0010); // nbLig - f1->GetFile()->ReplaceOrCreate( - f2->GetFile()->GetEntry(0x0028, 0x0011), 0x0028, 0x0011); // nbCol + f1->GetFile()->InsertValEntry( + f2->GetFile()->GetEntryValue(0x0028, 0x0010), 0x0028, 0x0010); // nbLig + f1->GetFile()->InsertValEntry( + f2->GetFile()->GetEntryValue(0x0028, 0x0011), 0x0028, 0x0011); // nbCol // Some other tags should be updated: @@ -65,8 +65,8 @@ int main(int argc, char* argv[]) f1->GetFile()->Print(); - std::string s0 = f2->GetFile()->GetEntry(0x7fe0, 0x0000); - std::string s10 = f2->GetFile()->GetEntry(0x7fe0, 0x0010); + std::string s0 = f2->GetFile()->GetEntryValue(0x7fe0, 0x0000); + std::string s10 = f2->GetFile()->GetEntryValue(0x7fe0, 0x0010); std::cout << "lgr 7fe0, 0000 " << s0 << std::endl; std::cout << "lgr 7fe0, 0010 " << s10 << std::endl;