X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDocEntrySet.cxx;h=d1856ef67c83a871272652d625d5ba197900e09d;hb=6d8a46d1577717ed6a5c9500d463bcdb39d25761;hp=ceba6d0747a1f6783269b7e8999c00f717eeb569;hpb=95e43356511d138225d8f718f632b3e7a8fcc106;p=gdcm.git diff --git a/src/gdcmDocEntrySet.cxx b/src/gdcmDocEntrySet.cxx index ceba6d07..d1856ef6 100644 --- a/src/gdcmDocEntrySet.cxx +++ b/src/gdcmDocEntrySet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 01:37:08 $ - Version: $Revision: 1.54 $ + Date: $Date: 2005/02/17 11:03:32 $ + Version: $Revision: 1.56 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -342,7 +342,7 @@ BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth, if ( !AddEntry(binEntry) ) { - gdcmWarningMacro( "AddEntry failed allthough this is a creation."); + gdcmWarningMacro( "AddEntry failed although this is a creation."); delete binEntry; return NULL; @@ -372,7 +372,7 @@ BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth, } /** - * \brief Modifies the value of a given Header Entry (Dicom Element) + * \brief Modifies the value of a given Doc Entry (Dicom Element) * when it exists. Creates it when unexistant. * @param group Group number of the Entry * @param elem Element number of the Entry @@ -382,7 +382,7 @@ BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth, SeqEntry *DocEntrySet::InsertSeqEntry(uint16_t group, uint16_t elem) { SeqEntry *seqEntry = 0; - DocEntry *currentEntry = GetDocEntry( group, elem); + DocEntry *currentEntry = GetDocEntry( group, elem ); // Verify the currentEntry if( currentEntry ) @@ -391,10 +391,9 @@ SeqEntry *DocEntrySet::InsertSeqEntry(uint16_t group, uint16_t elem) // Verify the VR if( seqEntry ) - if( seqEntry->GetVR()!="SQ" ) - seqEntry = NULL; + seqEntry = NULL; - // if currentEntry doesn't correspond to the requested valEntry + // if currentEntry doesn't correspond to the requested seqEntry if( !seqEntry ) { if (!RemoveEntry(currentEntry)) @@ -412,14 +411,19 @@ SeqEntry *DocEntrySet::InsertSeqEntry(uint16_t group, uint16_t elem) if( !AddEntry(seqEntry) ) { - gdcmWarningMacro( "AddEntry failed allthough this is a creation."); + gdcmWarningMacro( "AddEntry failed although this is a creation."); delete seqEntry; return NULL; } } + + // TODO : Find a trick to insert a SequenceDelimitationItem + // in the SeqEntry, at the end. return seqEntry; } + + /** * \brief Checks if a given Dicom Element exists within the H table