[Insight-users] NiftiImageIO intensity rescaling bug

Tom Vercauteren tom.vercauteren at gmail.com
Fri Feb 23 09:24:33 EST 2007


Hi,

I think there is a bug in the NiftiImageIO.

I have a Nifti data set that has the following tags: scl_inter=0 and
scl_slope=0.0431. The data should be between 0 and 11 but when I read
it with ITK, I get values beween 0 and 255. The intensity rescaling is
thus not performed.

I have been looking at the NiftiImageIO code and saw that the
intensity rescaling is only done if the following condition is met:
(m_RescaleSlope > 1 || m_RescaleIntercept != 0)

I would have used something like:
( fabs(m_RescaleSlope-1.0)>epsilon or fabs(m_RescaleIntercept)>epsilon )

I have filed a bug report for this:
http://www.itk.org/Bug/bug.php?op=show&bugid=4489

Best regards,
Tom Vercauteren


More information about the Insight-users mailing list