From: jpr Date: Wed, 21 Sep 2005 09:44:59 +0000 (+0000) Subject: Add some comments X-Git-Tag: Version1.2.bp~69 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=371fcc0f7c29d4b1a7783e3b563a17603e6d4f6f;p=gdcm.git Add some comments --- diff --git a/src/gdcmBinEntry.cxx b/src/gdcmBinEntry.cxx index f376df98..e27e6982 100644 --- a/src/gdcmBinEntry.cxx +++ b/src/gdcmBinEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBinEntry.cxx,v $ Language: C++ - Date: $Date: 2005/09/07 15:19:37 $ - Version: $Revision: 1.77 $ + Date: $Date: 2005/09/21 09:44:59 $ + Version: $Revision: 1.78 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -73,18 +73,30 @@ BinEntry::~BinEntry() void BinEntry::WriteContent(std::ofstream *fp, FileType filetype) { DocEntry::WriteContent(fp, filetype); - uint8_t* binArea8 = BinArea; //safe notation + uint8_t *binArea8 = BinArea; //safe notation size_t lgr = GetLength(); if (BinArea) // the binArea was *actually* loaded { - /// \todo Probably, the same operation should be done if we wanted - /// to write image with Big Endian Transfer Syntax, - /// while working on Little Endian Processor + + // The same operation should be done if we wanted + // to write image with Big Endian Transfer Syntax, + // while working on Little Endian Processor + // --> forget Big Endian Transfer Syntax writting! + // Next DICOM version will give it up ... + + // --> + // --> FIXME + // --> + // The stuff looks nice, but it's probably bugged, + // since troubles occur on big endian processors (SunSparc, Motorola) + // while reading the pixels of a + // gdcm-written Little-Endian 16 bits per pixel image #if defined(GDCM_WORDS_BIGENDIAN) || defined(GDCM_FORCE_BIGENDIAN_EMULATION) - /// \todo FIXME Right now, we only care of Pixels element + + /// \todo FIXME : Right now, we only care of Pixels element /// we should deal with *all* the BinEntries - /// well not really since we are not interpreting values read... + /// Well, not really since we are not interpreting values read... // 8 Bits Pixels *are* OB, 16 Bits Pixels *are* OW // -value forced while Reading process- diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index a584ae86..2da966c8 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2005/09/07 14:12:23 $ - Version: $Revision: 1.68 $ + Date: $Date: 2005/09/21 09:44:59 $ + Version: $Revision: 1.69 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -86,7 +86,7 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype) // // In order to avoid further troubles, we choose to write them // as 'no-length' Item Delimitors (we pad by writing 0xffffffff) - // We shall force the end of a given Item by writting + // We shall force the end of a given SeqItem by writting // a Item Delimitation Item (fffe, e00d) uint32_t ff = 0xffffffff; @@ -94,7 +94,7 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype) return; } - uint16_t z = 0; + uint16_t zero = 0; uint16_t shortLgr = (uint16_t)lgth; if (vr == GDCM_UNKNOWN) @@ -107,7 +107,7 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype) // we write 34 12 00 00 on little endian proc (OK) // we write 12 34 00 00 on big endian proc (KO) //binary_write(*fp, shortLgr); - //binary_write(*fp, z); + //binary_write(*fp, zero); binary_write(*fp, lgth); } @@ -118,7 +118,7 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype) if ( (vr == "OB") || (vr == "OW") || (vr == "SQ") /*|| (vr == "UN")*/ ) { - binary_write(*fp, z); + binary_write(*fp, zero); if (vr == "SQ") { // we set SQ length to ffffffff diff --git a/src/gdcmPixelWriteConvert.cxx b/src/gdcmPixelWriteConvert.cxx index e5f8ae9d..b4f67961 100644 --- a/src/gdcmPixelWriteConvert.cxx +++ b/src/gdcmPixelWriteConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelWriteConvert.cxx,v $ Language: C++ - Date: $Date: 2005/06/24 10:55:59 $ - Version: $Revision: 1.9 $ + Date: $Date: 2005/09/21 09:44:59 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -70,8 +70,8 @@ void PixelWriteConvert::SetUserData(uint8_t *data, size_t size) /** * \brief Get Data (UserData or ReadData) - * @return data data data (uint8_t is for prototyping. if your data is not uint8_t - * just cast the returned pointer) + * @return data (uint8_t is for prototyping. if your data is + * *not* uint8_t, just cast the returned pointer) */ uint8_t *PixelWriteConvert::GetData() {