From e70a7e5ba954ce367c4b1bce03f6c7065cd45edf Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 3 Nov 2005 14:21:50 +0000 Subject: [PATCH] Comments --- src/gdcmDocument.cxx | 13 ++++--------- src/gdcmFile.cxx | 25 ++++++++++++------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 2bf79ead..377d95a9 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2005/10/28 15:52:46 $ - Version: $Revision: 1.320 $ + Date: $Date: 2005/11/03 14:21:50 $ + Version: $Revision: 1.321 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -939,7 +939,7 @@ void Document::SkipBytes(uint32_t nBytes) } /** - * \brief Re-computes the length of a ACR-NEMA/Dicom group from a DcmHeader + * \brief Re-computes the length of the Dicom group 0002. */ int Document::ComputeGroup0002Length( ) { @@ -963,11 +963,6 @@ int Document::ComputeGroup0002Length( ) { vr = entry->GetVR(); - // FIXME : group 0x0002 is *always* Explicit VR! - // --> Except for Implicit VR Transfer Syntax (GE Private) !! - - //if ( filetype == ExplicitVR ) - //{ //if ( (vr == "OB")||(vr == "OW")||(vr == "UT")||(vr == "SQ")) // (no SQ, OW, UT in group 0x0002;) if ( vr == "OB" ) @@ -975,7 +970,7 @@ int Document::ComputeGroup0002Length( ) // explicit VR AND (OB, OW, SQ, UT) : 4 more bytes groupLength += 4; } - //} + groupLength += 2 + 2 + 4 + entry->GetLength(); } } diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 1ad8c6a7..c8e0d902 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.cxx,v $ Language: C++ - Date: $Date: 2005/11/02 10:15:04 $ - Version: $Revision: 1.299 $ + Date: $Date: 2005/11/03 14:23:13 $ + Version: $Revision: 1.300 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1471,19 +1471,18 @@ bool File::Write(std::string fileName, FileType writetype) e0000->SetString(sLen.str()); } - // Derma?.dcm does not have it...let's remove it FIXME FIXME + // FIXME : Derma?.dcm does not have it...let's remove it ?!? JPRx if( writetype != JPEG ) { - int i_lgPix = GetEntryLength(GrPixel, NumPixel); - if (i_lgPix != -2) - { - // no (GrPixel, NumPixel) element - std::string s_lgPix = Util::Format("%d", i_lgPix+12); - s_lgPix = Util::DicomString( s_lgPix.c_str() ); - InsertEntryString(s_lgPix,GrPixel, 0x0000); - } - } - + int i_lgPix = GetEntryLength(GrPixel, NumPixel); + if (i_lgPix != -2) + { + // no (GrPixel, NumPixel) element + std::string s_lgPix = Util::Format("%d", i_lgPix+12); + s_lgPix = Util::DicomString( s_lgPix.c_str() ); + InsertEntryString(s_lgPix,GrPixel, 0x0000); + } + } Document::WriteContent(fp, writetype); fp->close(); -- 2.45.1