From 7a643ab1e5005d3dce616db12e2e804d8466efdf Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 3 Feb 2005 15:44:50 +0000 Subject: [PATCH] Name normalization --- Example/WriteDicom.cxx | 79 ------------------- ...ldUpDicomDir.cxx => exBuildUpDicomDir.cxx} | 6 +- .../{TestPapyrus.cxx => exReadPapyrus.cxx} | 6 +- 3 files changed, 6 insertions(+), 85 deletions(-) delete mode 100644 Example/WriteDicom.cxx rename Example/{BuildUpDicomDir.cxx => exBuildUpDicomDir.cxx} (96%) rename Example/{TestPapyrus.cxx => exReadPapyrus.cxx} (98%) diff --git a/Example/WriteDicom.cxx b/Example/WriteDicom.cxx deleted file mode 100644 index 406a00ac..00000000 --- a/Example/WriteDicom.cxx +++ /dev/null @@ -1,79 +0,0 @@ -/*========================================================================= - - Program: gdcm - Module: $RCSfile: WriteDicom.cxx,v $ - Language: C++ - Date: $Date: 2005/02/02 10:06:32 $ - Version: $Revision: 1.16 $ - - 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 "gdcmFile.h" -#include "gdcmFileHelper.h" - -// Writting of a DICOM file based on a correct dicom header -// and data pixel of another image - -int main(int argc, char *argv[]) -{ - - if (argc < 3) - { - std::cerr << "Usage :" << std::endl << argv[0] << - " HeaderFileName DataFileName" << std::endl; - return 0; - } - - const char *first = argv[1]; - gdcm::FileHelper *f1 = new gdcm::FileHelper( first ); - - const char *second = argv[2]; - gdcm::FileHelper *f2 = new gdcm::FileHelper( second ); - - // We assume that DICOM fields of second file actually exists : - - std::string nbFrames = f2->GetFile()->GetEntryValue(0x0028, 0x0008); - if(nbFrames != "gdcm::Unfound") { - f1->GetFile()->InsertValEntry( nbFrames, 0x0028, 0x0008); - } - - 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: - - // TODO : add a default value - // TODO : a function which take as input a list of tuple (gr, el) - // and that does the job - - int dataSize = f2->GetImageDataSize(); - uint8_t *imageData = f2->GetImageData(); - - std::cout << "dataSize :" << dataSize << std::endl; - - // TODO : Shouldn't we merge those two functions ? - f1->SetImageData( imageData, dataSize); - - f1->GetFile()->Print(); - - 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; - - std::cout << "WriteDCM" << std::endl; - - f1->WriteDcmExplVR("WriteDicom.dcm"); - - return 0; -} diff --git a/Example/BuildUpDicomDir.cxx b/Example/exBuildUpDicomDir.cxx similarity index 96% rename from Example/BuildUpDicomDir.cxx rename to Example/exBuildUpDicomDir.cxx index 5fcbb33c..f36ad9c3 100644 --- a/Example/BuildUpDicomDir.cxx +++ b/Example/exBuildUpDicomDir.cxx @@ -1,10 +1,10 @@ /*========================================================================= Program: gdcm - Module: $RCSfile: BuildUpDicomDir.cxx,v $ + Module: $RCSfile: exBuildUpDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/02/02 10:06:31 $ - Version: $Revision: 1.14 $ + Date: $Date: 2005/02/03 15:44:50 $ + Version: $Revision: 1.1 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or diff --git a/Example/TestPapyrus.cxx b/Example/exReadPapyrus.cxx similarity index 98% rename from Example/TestPapyrus.cxx rename to Example/exReadPapyrus.cxx index 28ad2245..274bd324 100644 --- a/Example/TestPapyrus.cxx +++ b/Example/exReadPapyrus.cxx @@ -1,10 +1,10 @@ /*========================================================================= Program: gdcm - Module: $RCSfile: TestPapyrus.cxx,v $ + Module: $RCSfile: exReadPapyrus.cxx,v $ Language: C++ - Date: $Date: 2005/02/02 10:06:32 $ - Version: $Revision: 1.13 $ + Date: $Date: 2005/02/03 15:44:50 $ + Version: $Revision: 1.1 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or -- 2.46.2