[Insight-users] Bug report and bug fix in GDCM
Mathieu Malaterre
mathieu.malaterre at gmail.com
Mon Jun 18 06:21:03 EDT 2007
Thanks ! This will be merged back in the main gdcm repository.
$ cvs ci -m"BUG: Fix SplitOnPosition/SplitOnOrientation and
SplitOnTagValue. Thanks to Pierre Fillard, for report and patch"
/cvsroot/Insight/Insight/Utilities/gdcm/src/gdcmSerieHelper.cxx,v <--
gdcmSerieHelper.cxx
new revision: 1.25; previous revision: 1.24
-Mathieu
On 6/15/07, Pierre Fillard <Pierre.Fillard at inria.fr> wrote:
> Not sure whether this is the right place to submit a bug in GDCM, but as
> it is distributed with ITK, I thought you might be interesting.
>
> In one of my program, I use GDCM to split DICOMs when they are
> interlaced (case of DTI for instance).
> I call the function 'SplitOnPosition' of the class SerieHelper (the code
> is in the file Utilities/gdcm/src/gdcmSerieHelper.cxx) to split the
> volume into several other volumes.
> This function always skips the very first DICOM, and eventually removes
> it from the list, because of this part of the code (starting line 466 of
> file gdcmSerieHelper.cxx):
>
> *FileList::const_iterator it = fileSet->begin();
> it ++;
> for ( ;
> it != fileSet->end();
> ++it)
> { (...)*
>
> Maybe I am missing something, but there is no reason why there should be
> a (it++) right before the loop. It makes the split always skip the
> first dicom. Changing it to:
>
> *FileList::const_iterator it = fileSet->begin();
> for ( ;
> it != fileSet->end();
> it++)
> { (...)*
>
> solved the problem. Two other functions should be changed the same way:
> SplitOnOrientation and SplitOnTagValue.
>
> By the way, I am using the CVS version of ITK.
> I hope this was useful.
>
> Pierre Fillard,
> PhD Candidate,
> Asclepios Research Team, INRIA, France.
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
--
Mathieu
More information about the Insight-users
mailing list