Program: gdcm
Module: $RCSfile: gdcmBinEntry.cxx,v $
Language: C++
- Date: $Date: 2004/11/15 16:12:30 $
- Version: $Revision: 1.36 $
+ Date: $Date: 2004/11/24 16:39:18 $
+ Version: $Revision: 1.38 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BinEntry::BinEntry(DictEntry* e) : ValEntry(e)
{
BinArea = 0;
+ SelfArea = true;
}
/**
//SQDepthLevel = e->GetDepthLevel();
BinArea = 0; // let's be carefull !
+ SelfArea = true;
}
/**
*/
BinEntry::~BinEntry()
{
- if (BinArea)
+ if (BinArea && SelfArea)
{
delete[] BinArea;
BinArea = 0; // let's be carefull !
void BinEntry::Print(std::ostream &os)
{
+ os << "B ";
DocEntry::Print(os);
std::ostringstream s;
void* binArea = GetBinArea();
/// \brief Sets the value (non string) of the current Dicom Header Entry
-void BinEntry::SetBinArea( uint8_t* area )
+void BinEntry::SetBinArea( uint8_t* area, bool self )
{
- if (BinArea)
+ if (BinArea && SelfArea)
delete[] BinArea;
+
BinArea = area;
+ SelfArea=self;
}
//-----------------------------------------------------------------------------