[Dcmlib] strange behaviour

Jean-Pierre ROUX jean-pierre.roux at creatis.insa-lyon.fr
Sun Oct 21 11:57:12 CEST 2007


>Hi Jean Pierre, Hi users,
>
>Using a simplified piece of code and debugging it I found a very 
>strange behaviour
>(please see the code at bottom).
>
>Triing to read, more time, 2 different dataset  I have different 
>different result in size of series:   
>
>
>Dataset1  composed of 66 axial slices in only one serie and no Xserie
> 
>                                    
>Dat2set2  composed of 107 axial slices ( with 1 Xserie composed 1 slice)


Hi, Gianni,

Could you upload, somewhere, the dataset you're working on (so we can 
download it an see what's going wrong)

I remember I had some troubles, a few months ago, with the 'ordering' 
of gdcm::SerieHelper, and I think I didn't fix the problem, because I 
had to work on something else, and I forgot to send a bug report to 
myself...

Thx.

Jean-Pierre Roux


>
>
>Sometimes the size of serie is wrong detected ( loading various 
>times the datasets) as indicated below.
> Is it an error of mine or something related to 
>sh->OrderFileList((*i).second);  // sort the XCoherent Fileset  ?
>
>Thank you very much for the ansvers
>
>
>
>AnsiString tempfilename;
>
>  TStringList *filelist;
>  int nbFiles0 = 0;
>  int nbFiles1 = 0;
>  int size = 0;
>
>  gdcm::SerieHelper *sh = gdcm::SerieHelper::New();
>  sh->SetLoadMode(gdcm::LD_ALL);       // Load all for each file
>  sh->SetDirectory(fold.c_str(),true); // Recursive parsing
>
>  gdcm::FileList *l = sh->GetFirstSingleSerieUIDFileSet();
>  gdcm::XCoherentFileSetmap xcm;
>
>  while (l) // for each 'Single SerieUID FileSet'
>   {
>   if ( l->size() > 5))
>            {
>             xcm = sh->SplitOnOrientation(l);
>             for (gdcm::XCoherentFileSetmap::iterator i = 
>xcm.begin(); i != xcm.end();++i)
>                  {
>                  size = xcm.size();
>                  nbFiles0 = ((*i).second)->size(); 
>                                                                

> DAT1 is 66,  DAT 2 is 107)
>
>
>                   if ( (*i).second->size() > 5))
>                         {
>                         sh->OrderFileList((*i).second);  // sort 
>the XCoherent Fileset
>                          nbFiles1 = ((*i).second)->size(); 
>                                                     


> DAT1 sometimes 66 sometimes 33 ,  DAT 2 sometimes 106 sometimes 53)
>
>
>                          for (gdcm::FileList::iterator it = 
>((*i).second)->begin();it != ((*i).second)->end();++it)
>                               {
>                                tempfilename = 
>AnsiString((*it)->GetFileName().c_str());
>                                filelist->Add(tempfilename); //make a filelist
>                               }
>                          }
>                    }
>             }
>            l = sh->GetNextSingleSerieUIDFileSet();
>  }
>
>  ....
>  ....
>  ....load filelist

  Jean-Pierre ROUX
   CREATIS - CNRS UMR 5220, INSERM U 630
   Laboratoire de Radiologie Experimentale
   Hopital Cardiologique
   28 Avenue du Doyen LEPINE
   B.P. Lyon-Montchat
   69394 Lyon Cedex 03
 
   Tel      : (+33) 04 72 35 74 12
   Fax      : (+33) 04 72 68 49 16
   URL      : http://www.creatis.univ-lyon1.fr/~jpr
   e-mail   : jpr at creatis.univ-lyon1.fr
								   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3769 bytes
Desc: not available
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20071021/d226509f/attachment.bin>


More information about the Dcmlib mailing list