X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDir.cxx;h=45839d9f766f322b9fc652f75e18bd981b8f8dc9;hb=d97e9432393b8515630a11586e0e95df6be9eb43;hp=58e58b631a8692475feabaffbb23a362f5059a6d;hpb=ba78e6c6d47d6db1528e8e88e5ebde7296a26692;p=gdcm.git diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 58e58b63..45839d9f 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 20:16:57 $ - Version: $Revision: 1.85 $ + Date: $Date: 2004/12/16 13:46:36 $ + Version: $Revision: 1.90 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -169,8 +169,8 @@ void DicomDir::Print(std::ostream &os) cc != Patients.end(); ++cc) { - (*cc)->SetPrintLevel( PrintLevel ); - (*cc)->Print( os ); + (*cc)->SetPrintLevel(PrintLevel); + (*cc)->Print(os); } } @@ -422,7 +422,6 @@ void DicomDir::CreateDicomDirChainedList(std::string const & path) break; } -std::cerr<<"File : "<c_str()<c_str() ); if( !header ) { @@ -455,11 +454,11 @@ std::cerr<<"File : "<c_str()<(*it); + delete dynamic_cast
(*itDoc); } } @@ -482,7 +481,7 @@ DicomDirMeta * DicomDir::NewMeta() cc != lastOneButSequence; ++cc) { - m->AddDocEntry( cc->second ); + m->AddEntry( cc->second ); } } else // after root directory parsing @@ -519,29 +518,7 @@ DicomDirPatient * DicomDir::NewPatient() entry->SetOffset(0); // just to avoid further missprinting entry->SetValue( it->Value ); - // dealing with value length ... - - if( dictEntry->GetGroup() == 0xfffe) - { - entry->SetLength(entry->GetValue().length()); - } - else if( dictEntry->GetVR() == "UL" || dictEntry->GetVR() == "SL" ) - { - entry->SetLength( 4 ); - } - else if( dictEntry->GetVR() == "US" || dictEntry->GetVR() == "SS" ) - { - entry->SetLength(2); - } - else if( dictEntry->GetVR() == "SQ" ) - { - entry->SetLength( 0xffffffff ); - } - else - { - entry->SetLength( entry->GetValue().length() ); - } - p->AddDocEntry( entry ); + p->AddEntry( entry ); } Patients.push_front( p ); @@ -639,7 +616,6 @@ void DicomDir::SetElement(std::string const & path, DicomDirType type, entry = new ValEntry( dictEntry ); // Be sure it's never a BinEntry ! entry->SetOffset(0); // just to avoid further missprinting - entry->SetLength(0); // just to avoid further missprinting if( header ) { @@ -683,34 +659,8 @@ void DicomDir::SetElement(std::string const & path, DicomDirType type, val = it->Value; } - // GDCM_UNFOUND or not ! - entry->SetValue( val ); // troubles expected when vr=SQ ... - if( dictEntry ) - { - if( dictEntry->GetGroup() == 0xfffe ) - { - entry->SetLength( entry->GetValue().length() ); // FIXME - } - else if( dictEntry->GetVR() == "UL" || dictEntry->GetVR() == "SL" ) - { - entry->SetLength(4); - } - else if( dictEntry->GetVR() == "US" || dictEntry->GetVR() == "SS" ) - { - entry->SetLength(2); - } - else if( dictEntry->GetVR() == "SQ" ) - { - entry->SetLength( 0xffffffff ); - } - else - { - entry->SetLength( entry->GetValue().length() ); - } - } - if ( type == GDCM_DICOMDIR_META ) // fusible : should never print ! { std::cout << "GDCM_DICOMDIR_META ?!? should never print that"