X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDir.cxx;h=7eb67e4af159aed227c28cecbc381c59cf50bde5;hb=95dcce2c32665bcba9aa2d20c13390271a204e23;hp=80591ac05bf9a4e85735d0aa589d3ee645ccb890;hpb=b616acd3a7a3dc34524e9f2482d70b25a6e1beff;p=gdcm.git diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 80591ac0..7eb67e4a 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/01/26 09:49:53 $ - Version: $Revision: 1.119 $ + Date: $Date: 2005/01/29 11:43:05 $ + Version: $Revision: 1.122 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -461,15 +461,12 @@ void DicomDir::CreateDicomDirChainedList(std::string const & path) /** * \brief adds *the* Meta to a partially created DICOMDIR - */ - + */ DicomDirMeta *DicomDir::NewMeta() { if( MetaElems ) delete MetaElems; - // friend class hunting : we miss GetLastEntry and GetPreviousEntry - // to be able to remove any direct reference to TagHT DocEntry *entry = GetFirstEntry(); if( entry ) { @@ -728,7 +725,7 @@ void DicomDir::Initialize() */ void DicomDir::CreateDicomDir() { - // The list is parsed. + // The SeqEntries of "Directory Record Sequence" are parsed. // When a DicomDir tag ("PATIENT", "STUDY", "SERIE", "IMAGE") is found : // 1 - we save the beginning iterator // 2 - we continue to parse @@ -740,7 +737,7 @@ void DicomDir::CreateDicomDir() DocEntry *e = GetDocEntry(0x0004, 0x1220); if ( !e ) { - gdcmVerboseMacro( "NO Directory record sequence (0x0004,0x1220)"); + gdcmVerboseMacro( "No Directory Record Sequence (0004,1220) found"); /// \todo FIXME: what to do when the parsed file IS NOT a DICOMDIR file ? return; } @@ -748,8 +745,7 @@ void DicomDir::CreateDicomDir() SeqEntry *s = dynamic_cast(e); if ( !s ) { - gdcmVerboseMacro( "No SeqEntry present"); - // useless : (0x0004,0x1220) IS a Sequence ! + gdcmVerboseMacro( "Element (0004,1220) is not a Sequence ?!?"); return; } @@ -819,9 +815,11 @@ void DicomDir::CreateDicomDir() // neither an 'IMAGE' SQItem. Skip to next item. continue; } + if( si ) + MoveSQItem(si,tmpSI); + tmpSI=s->GetNextSQItem(); } -// friend hunting : this one will be difficult to remove ! ClearEntry(); }