[Dcmlib] [Fwd: CREATIS CVS: gdcm jpr] warnings while running TestAllReadCompareDicom -> Fixed

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Jul 6 17:04:48 CEST 2005


Jean-Pierre Roux wrote:
> Mathieu Malaterre wrote:
> [...]
> 
>> I still don't see why we parse 2 times the same DICOM file ? Why can't 
>> we simply reuse the tags the 2nd times ?
> 
> 
> Only TestAllReadCompareDicom does.
> If someone writes
> gdcm::File f = new gdcm::File();
> f-> Load("myFileOne.dcm");
> f-> Load("myFileTwo.dcm");
> 
> the loader should be aware there are 2 different files.
> 
> If someone writes
> gdcm::File f = new gdcm::File();
> f-> Load("myFileOne.dcm");
>                                                             --> maybe a 
> ftp replaced myFileOne.dcm
> f-> Load("myFileOne.dcm);
>                                                             --> the 
> loader cannot be aware of anything
> (Probabely this is not the user wanted to do ...)
> 
> Load method has a commented line "Fixme : maybe whe should clear Entries"
> I just replaced it by "ClearEntries();"

Look to me like a call to the function

f->Load( bla )

should check that previous filename != bla. If AND only if the filename 
change are we allowed to reparse the file. I cannot think of any 
resonable case where the filename is change within the few microseconds 
we are reading the file...

Mathieu



More information about the Dcmlib mailing list