[MINC-development] -O3 breaks N3

Alex Zijdenbos zijdenbos at gmail.com
Fri Apr 20 07:50:13 EDT 2012


On Fri, Apr 20, 2012 at 7:08 AM, Andrew Janke <a.janke at gmail.com> wrote:
> On 20 April 2012 00:59, Vladimir S. FONOV <vladimir.fonov at gmail.com> wrote:
>> I managed to track problem further. First, it turns out that on new
>> build  volume_stats -nocache produced very different results then
>> default (and consistent with old build). So, I disabled caching.
>>
>> On top of that, I discovered that the output of sharpen_hist changed
>> significantly.
>
> I believe you have struck exactly the same issues that galvanised me
> into writing mincstats a looooong time ago. At the time the plan was
> to replace all calls of volume_stats in N3 with mincstats but this
> never came to fruition given EBTKS's? creative interpretation of how
> to compute a histogram on a integer volume.
>
> Unfortunately N3's histogram entropy calculation is rather dependant
> on this behaviour so mincstats attempts to mimic this with
> -discrete_histogram but it's not quite the same. It comes down to
> EBTKS defining bins as the edge of frequency counts whereas it should
> be the centers. 'man mincstats' for more on this.

Hmm I recall this old discussion vaguely, but looking at the
EBTKS/volume_stats code it seems to do exactly what you describe as
the "right" way; bins are calculated +/- 0.5, with one bin more than
the voxel range of the volume; I thought there was some other subtlety
that caused differences.

Either way though, perhaps the question should be whether we can still
replace volume_stats with mincstats in N3. I personally don't see an
issue with a new version/release changing outcome, and that people
should just be aware of (and keep) old versions if they are attached
to the results it produced. This is assuming of course that it won't
actually break, and that the change is clearly noted somewhere.

-- A


More information about the MINC-development mailing list