[Dcmlib] Loading twice the same File

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu Jul 7 17:13:18 CEST 2005


Jean-Pierre Roux wrote:
> Mathieu Malaterre wrote:
> 
>> JP,
>>
>>     Excellent analysis !
>>     Now maybe you don't remember but you ask me -long time ago- why we 
>> need to define accessor to set member variables of a class. Here are 
>> some more examples, the goal is to know when the file is supposed to 
>> be read (which line du the actual reading):
>>
>> #1
>> gdcm::File file("bla");
>> file.SetLoadMode(NO_SEQ);
>>
>> #2
>> gdcm::File file();
>> file.Load("bla");
>> file.SetLoadMode(NO_SEQ);
>>
>> #3
>> gdcm::File file();
>> file.SetLoadMode(NO_SEQ);
>> file.Load("bla");
>> file.Load("bla2");
>> file.Load("bla23");
>> file.Load("bla2");
>> file.Load("bla");
>>
>> #1 and #2 are pretty straigforward to understand, the load mode is 
>> never taken into account.
>> #3 Is a completely degenerate case where the user don't know exactly 
>> what he is doing. But anyway gdcm will read 5 files... and at the end 
>> we would only need to read one. So far it is ok since the reading a 
>> file is fast enough not to be troublesome.
> 
> 
> I do agree with you.
> I'm gonna add the gdcm::File::SetFileName() method.
> and a 'bool Modified' private member.



Cool ! Getting closer to the gdcm2 proposal :)

Mathieu



More information about the Dcmlib mailing list