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