[ITK] [ITK-dev] Probelms with recent "Image spacing must be positive" change...

Sean McBride sean at rogue-research.com
Fri Jul 21 12:27:36 EDT 2017


On Fri, 2 Jun 2017 16:18:37 -0400, Sean McBride said:

>7501479a970694b0dd4a8c4bbf7cbcc033fe059c is the first bad commit
>commit 7501479a970694b0dd4a8c4bbf7cbcc033fe059c
>Author: Francois Budin <francois.budin at gmail.com>
>Date:   Mon Oct 31 17:04:05 2016 -0400
>
>    ENH: Image spacing must be positive
>    
>    Image spacing must have values greater than 0. Negative
>    values could create issues with filters that assume that they
>    are positive.
>    When an image is loaded, if its spacing is negative, its absolute
>    value is kept, and the image direction along each axis with a
>    negative spacing is flipped.
>    
>    Change-Id: Id81d61b7fd3f60df2b38e30e540664dba6264996
>
>Which is here:
><http://review.source.kitware.com/#/c/21685/>
>
>Looks like this shipped in 4.11 (we are using 4.10.1).
>
>Our test case is an Analyze 7.5 file with negative spacing.  I'll dig
>into it next week...

François, Matt,

So this change is causing us backwards-compatibility problems.

What do you think about adding an API so that it can be known if/which axes were flipped?  As it is now, the flipping newly performed by ITK cannot be detected.  If such a change is acceptable, I can make a patch...

(Our app used to warn users that files with negative spacing are problematic, but now we have no means to generate this warning, unless I'm missing something.)

Thanks,

Sean


_______________________________________________
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://public.kitware.com/mailman/listinfo/insight-developers


More information about the Community mailing list