X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=src%2FgdcmDataEntry.cxx;h=106310443eca7167723e73e1f45ff1da4ff8cdc3;hb=5037cb08a173d3ac3b4d9db71201c635bcabd19b;hp=5678ac8f5290a8464aaacc03302674ac6bf25f82;hpb=745e3abcf3563cd15ebb92316d6dd800d8199340;p=gdcm.git diff --git a/src/gdcmDataEntry.cxx b/src/gdcmDataEntry.cxx index 5678ac8f..10631044 100644 --- a/src/gdcmDataEntry.cxx +++ b/src/gdcmDataEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDataEntry.cxx,v $ Language: C++ - Date: $Date: 2007/08/22 16:14:03 $ - Version: $Revision: 1.45 $ + Date: $Date: 2007/09/14 08:22:19 $ + Version: $Revision: 1.48 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -82,15 +82,15 @@ DataEntry::~DataEntry () } -//----------------------------------------------------------------------------- -// Print - //----------------------------------------------------------------------------- // Public /** * \brief Sets the value (non string) of the current DataEntry * @param area area - * @param self self + * @param self self=true : The area : *belongs" to the DataEntry + * : will be delete with the DataEntry + * self=false The area *is not* deleted with the DataEntry + * */ void DataEntry::SetBinArea( uint8_t *area, bool self ) { @@ -118,7 +118,7 @@ void DataEntry::CopyBinArea( uint8_t *area, uint32_t length ) NewBinArea(); memcpy(BinArea,area,length); if( length!=lgh ) - BinArea[length]=0; + BinArea[length]=0; // padd with zero State = STATE_LOADED; } @@ -547,10 +547,10 @@ void DataEntry::Copy(DocEntry *doc) * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...) */ void DataEntry::WriteContent(std::ofstream *fp, FileType filetype, - bool insideMetaElements) + bool insideMetaElements, bool insideSequence) { // writes the 'common part' - DocEntry::WriteContent(fp, filetype, insideMetaElements); + DocEntry::WriteContent(fp, filetype, insideMetaElements, insideSequence); if ( GetGroup() == 0xfffe ) { @@ -651,6 +651,7 @@ uint32_t DataEntry::ComputeFullLength() //----------------------------------------------------------------------------- // Protected + /// \brief Creates a DataEntry owned BinArea /// (remove previous one if any and relevant StrArea if any) void DataEntry::NewBinArea( ) @@ -688,7 +689,9 @@ void DataEntry::DeleteBinArea(void) */ void DataEntry::Print(std::ostream &os, std::string const & ) { - os << "D "; + //os << "D "; + + // First, Print the common part (vr [length offset] name). DocEntry::Print(os); uint16_t g = GetGroup();