[Insight-users] Bug Report (with bugfix): GDCM SerieHelper::SplitOnOrientation

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu Jun 1 15:09:50 EDT 2006


Csaba,

	Could you open a bug report for that at:

	http://itk.org/Bug

	and assign it to me.

Thanks
Mathieu
Ps: ITK ML traffis is pretty high and I missed your post, sorry.

Csaba Csoma wrote:
> Problem:
> 
>  Using GDCMSeriesFileNames to search for volumes the Series
>  Restriction should be this:
>   "0020|0052" - Frame Of Reference (invalid coords if changed)
>   "0020|000e" - Series Instance UID (series defined by the scanner)
>   "0020|0037" - Patient Orientation
> 
>  The "Patient Orientation" is necessary since in MRI the scout
>  scan will create 3 volumes (axial, sagittal and coronal) into
>  a singles series.
> 
>  But the GE scanner (NIH, Bethesda) created the following Orientations:
>   -0.474171\0.877813\-0.0678738\0.117436\*-0.0133367*\-0.992991
>   -0.474171\0.877813\*-0.0678738*\0.117436\*-0.0133368* \-0.992991
>   -0.474171\0.877813\*-0.0678739*\0.117436\-0.0133367\-0.992991
>  so AddSeriesRestriction or SerieHelper::SplitOnOrientation will
>  split this single volume into multiple (sub) volumes.
> 
>  The problem is due to rounding error in the GE scanner, but the
>  float/double variable is known to not be precise for == type
>  comparisons. (Floating point is implemented using fractional
>  powers of 2, so it is an approximation of the real value.)
> 
> 
> Solution:
> 
>  AddSeriesRestriction is not a solution, since the Orientation is
>  written in 0020 0037 or 0020 0035 - and it would not be a generic
>  solution anyway.
> 
>  GDCM SerieHelper::SplitOnOrientation can be used if it will crop the
>  last decimal of the cosines strings. Something like this:
> 
>  std::string CropLastDecimal(std::string s)
>  {
>      if ( s.size() < s.find_first_of('.')+1 )
>         return s.substr(0, s.size()-1);
>      return s;
>  }
> 
>  called for each element of the cosines matrix.
> 
>  Sure this could be made into a more robust solution (compare with
>  "abs" in floating or double variable level) in long run.
> 
> Csaba
> 
> 
> Csaba Csoma
> Systems Engineer
> ------------------------
> Johns Hopkins University
> 3400  North Charles Str.
> B26 New Engineering Bldg
> Baltimore, MD 21218-2682
> Phone: (410) 516-4991
> mailto:csoma at jhu.edu
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list