X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmBinEntry.cxx;h=47af8c38888458dcebd528afb2c88285982be9e6;hb=692f863c018c259a380e664d3608a46ec0c8bb3e;hp=720bbd7714f807c360d0b3fd7b7cbafeae1eb023;hpb=3ac7a631bee01193732c9ae23e90dc75181697ec;p=gdcm.git diff --git a/src/gdcmBinEntry.cxx b/src/gdcmBinEntry.cxx index 720bbd77..47af8c38 100644 --- a/src/gdcmBinEntry.cxx +++ b/src/gdcmBinEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBinEntry.cxx,v $ Language: C++ - Date: $Date: 2004/09/09 17:49:24 $ - Version: $Revision: 1.24 $ + Date: $Date: 2004/09/23 09:40:30 $ + Version: $Revision: 1.29 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,7 +28,7 @@ */ gdcmBinEntry::gdcmBinEntry(gdcmDictEntry* e) : gdcmValEntry(e) { - VoidArea = NULL; + VoidArea = 0; } /** @@ -42,7 +42,8 @@ gdcmBinEntry::gdcmBinEntry(gdcmDocEntry* e) : gdcmValEntry(e->GetDictEntry()) ImplicitVR = e->IsImplicitVR(); Offset = e->GetOffset(); PrintLevel = e->GetPrintLevel(); - SQDepthLevel = e->GetDepthLevel(); + //FIXME + //SQDepthLevel = e->GetDepthLevel(); VoidArea = 0; // let's be carefull ! } @@ -54,7 +55,7 @@ gdcmBinEntry::~gdcmBinEntry() { if (VoidArea) { - free (VoidArea); + delete[] VoidArea; VoidArea = 0; // let's be carefull ! } } @@ -117,6 +118,15 @@ void gdcmBinEntry::Write(FILE *fp, FileType filetype) //----------------------------------------------------------------------------- // Public + +/// \brief Sets the value (non string) of the current Dicom Header Entry +void gdcmBinEntry::SetVoidArea( uint8_t* area ) +{ + if (VoidArea) + delete[] VoidArea; + VoidArea = area; +} + //----------------------------------------------------------------------------- // Protected