[Dcmlib] SerieHelper recursion limit

Jean-Pierre Roux jpr at creatis.insa-lyon.fr
Mon Mar 10 17:24:43 CET 2008


Lazzarato Dr.Gianni wrote:
>
> Hi  Jp, Mathieu and users,
>
>  
>
> Using this code:
>
>  
>
> gdcm::SerieHelper *sh = gdcm::SerieHelper::New();
>
>    sh->SetLoadMode(gdcm::LD_ALL);       // Load all for each file
>
>    sh->SetDirectory(path,true); // Recursive parsing
>
>  
>
>  
>
> if in the path I have a lot of directories with a lots of patients 
> this code reach an error probably due to the large amount of studies 
> founded.
>
>  
>
> Is there a easy way to restrict the number of studies sh retrieve or a 
> preliminary chek before   sh->SetDirectory(path,true); // Recursive 
> parsing   ?
>

Hi, Gianni.

Right now, nothing is done.
-> How many images are there (recursively) in the directory?
-> On what criterion would you like to restrict the studies from being 
loaded?

They is a  method
gdcm::SerieHelper::AddRestriction(uint16_t group, uint16_t elem, 
std::string const &value, int op);
that allows you to ask for dropping images that don't match to a given 
criterion on a given tag
for instance images where modality IS NOT "CT", or where date is < 
"01-01-2007",  or where patient name is not "Lazzarato Dr.Gianni", etc.
(restriction criterions are 'added' if gdcm::SerieHelper::AddRestriction 
method is called more than once)

They are not taken into account at loading time, but it shouldn't be 
very difficult (/ should be usefull ?)  to add the feature.
Would it solve your problem?

Jean-Pierre




>  
>
> Thanks
>
>  
>
> Gianni
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Dcmlib mailing list
> Dcmlib at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib



More information about the Dcmlib mailing list