[Insight-developers] query/suggestion: adjustable tolerance in ImageToImageFilter

Williams, Norman K norman-k-williams at uiowa.edu
Wed Aug 29 10:14:15 EDT 2012


I also ran into this recently.

There is an absolute tolerance of 1.0e-6 This means that small numbers can
differ significantly and pass, and large numbers can differ slightly and
fail.

The problem I ran into was with diffusion weighted images. To go from NRRD
format to FSL format and back, I get numeric errors in the
position/orientation/spacing, since NRRD files only store 3 significant
digits after the decimal point.  A significant absolute numerical error
happens if (as I do in testing), try to convert an FSL file to NRRD, then
convert the result back to FSL and compare the original with the result.

I was trying to be clever and compared the two images by a pipeline of a
SubtractImageFilter into a Statistics filter, and the SubtractImageFilter
would throw an exception because of differences in the
directions/origin/spacing of the two NIfTI files.

--
Kent Williams norman-k-williams at uiowa.edu






On 8/28/12 7:01 PM, "Richard Beare" <richard.beare at gmail.com> wrote:

>Hi,
>I thought I'd mention a problem I just came across that may have a fix
>I missed. If not then perhaps it can go into a feature request.
>
>I was performing a mask operation and received an error saying that
>images weren't in the same space. The relevant code is in the
>ImageToImage filter base class where the orientation matrices are
>checked. There doesn't seem to be a way of adjusting the tolerance or
>turning this check off. My problem image was produced by the spm8
>coregistration procedure, and the difference in orientation matrix
>introduced by rounding  (I assume) was only just greater than the hard
>coded tolerance. I've fixed the problem by explicitly copying the
>geometry in the input nifti files using the fslcpgeom tool, but I
>suspect there should be some ITK specific option to deal with this
>inside a filter. Obviously image information can be copied inside ITK
>code too. Not sure if there is a "right" way to deal with this issue.
>_______________________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Kitware offers ITK Training Courses, for more information visit:
>http://kitware.com/products/protraining.php
>
>Please keep messages on-topic and check the ITK FAQ at:
>http://www.itk.org/Wiki/ITK_FAQ
>
>Follow this link to subscribe/unsubscribe:
>http://www.itk.org/mailman/listinfo/insight-developers



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list