[Insight-users] NiftiImageIO intensity rescaling bug
hans-johnson at uiowa.edu
Fri Feb 23 09:51:42 EST 2007
I agree with you. I will look more closely at this later today, and should
have a cvs commit in before end of business today.
Thank you for the detailed report and suggestion for a fix.
On 2/23/07 8:24 AM, "Tom Vercauteren" <tom.vercauteren at gmail.com> wrote:
> 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:
> Best regards,
> Tom Vercauteren
> Insight-users mailing list
> Insight-users at itk.org
More information about the Insight-users