[Dcmlib] strange behaviour
Lazzarato Dr.Gianni
lazzadrgi at libero.it
Sat Oct 20 16:12:47 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)
Sometimes the size of serie is wrong detected ( loading varius time 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20071020/ab01e540/attachment.html>
More information about the Dcmlib
mailing list