Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/01/20 11:33:44 $
- Version: $Revision: 1.110 $
+ Date: $Date: 2005/01/20 16:16:41 $
+ Version: $Revision: 1.111 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if( MetaElems )
delete MetaElems;
- MetaElems = new DicomDirMeta();
if ( TagHT.begin() != TagHT.end() ) // after Document Parsing
{
+ MetaElems = new DicomDirMeta(true);
+
TagDocEntryHT::iterator lastOneButSequence = TagHT.end();
lastOneButSequence --;
// ALL the 'out of Sequence' Tags belong to Meta Elems
}
else // after root directory parsing
{
- ListDicomDirMetaElem const &elemList =
- Global::GetDicomDirElements()->GetDicomDirMetaElements();
- MetaElems->FillObject(elemList);
+ MetaElems = new DicomDirMeta(false);
}
MetaElems->SetSQItemNumber(0); // To avoid further missprinting
return MetaElems;
*/
DicomDirPatient *DicomDir::NewPatient()
{
- ListDicomDirPatientElem const & elemList =
- Global::GetDicomDirElements()->GetDicomDirPatientElements();
DicomDirPatient *p = new DicomDirPatient();
- p->FillObject(elemList);
-
AddPatientToEnd( p );
return p;
}
{
case GDCM_DICOMDIR_IMAGE:
elemList = Global::GetDicomDirElements()->GetDicomDirImageElements();
- si = new DicomDirImage();
+ si = new DicomDirImage(true);
if( !AddImageToEnd(static_cast<DicomDirImage *>(si)) )
{
delete si;
break;
case GDCM_DICOMDIR_SERIE:
elemList = Global::GetDicomDirElements()->GetDicomDirSerieElements();
- si = new DicomDirSerie();
+ si = new DicomDirSerie(true);
if( !AddSerieToEnd(static_cast<DicomDirSerie *>(si)) )
{
delete si;
break;
case GDCM_DICOMDIR_STUDY:
elemList = Global::GetDicomDirElements()->GetDicomDirStudyElements();
- si = new DicomDirStudy();
+ si = new DicomDirStudy(true);
if( !AddStudyToEnd(static_cast<DicomDirStudy *>(si)) )
{
delete si;
break;
case GDCM_DICOMDIR_PATIENT:
elemList = Global::GetDicomDirElements()->GetDicomDirPatientElements();
- si = new DicomDirPatient();
+ si = new DicomDirPatient(true);
if( !AddPatientToEnd(static_cast<DicomDirPatient *>(si)) )
{
delete si;
break;
case GDCM_DICOMDIR_META:
elemList = Global::GetDicomDirElements()->GetDicomDirMetaElements();
- si = new DicomDirMeta();
+ si = new DicomDirMeta(true);
if( MetaElems )
{
delete MetaElems;
if( v == "PATIENT " )
{
- si = new DicomDirPatient();
+ si = new DicomDirPatient(true);
if( !AddPatientToEnd( static_cast<DicomDirPatient *>(si)) )
{
delete si;
}
else if( v == "STUDY " )
{
- si = new DicomDirStudy();
+ si = new DicomDirStudy(true);
if( !AddStudyToEnd( static_cast<DicomDirStudy *>(si)) )
{
delete si;
}
else if( v == "SERIES" )
{
- si = new DicomDirSerie();
+ si = new DicomDirSerie(true);
if( !AddSerieToEnd( static_cast<DicomDirSerie *>(si)) )
{
delete si;
}
else if( v == "IMAGE " )
{
- si = new DicomDirImage();
+ si = new DicomDirImage(true);
if( !AddImageToEnd( static_cast<DicomDirImage *>(si)) )
{
delete si;