[MINC-development] MINC2 file with floating-point voxels and slice normalization

Vladimir S. FONOV vladimir.fonov at gmail.com
Thu Jan 17 18:09:20 EST 2013


Hello,

On Thu, Jan 17, 2013 at 6:02 PM, Andrew Janke <a.janke at gmail.com> wrote:

> Hi Vladimir,
>
> On 18 January 2013 06:36, Vladimir S. FONOV <vladimir.fonov at gmail.com>
> wrote:
> > I came across a following problem -  I have got a minc volume with float
> > type, but with image_max and image_min specifying range for each slice.
> >
> > It turns out that there is actually no normalization performed in the
> actual
> > voxel values (as one would expect) and MINC1 api while dealing with this
> > file forks properly.
> >
> > Unfortunately, MINC2 api checks if the image_max and image_min variables
> > have dimension more then 1 and if it is the case, the inter-slice
> > normalization is enabled  (i.e see
> > https://github.com/BIC-MNI/libminc/blob/master/libsrc2/volume.c#L1122 ).
>
> Ack! good catch.
>

I made a hack which fixes the problem in minc_lite:
https://github.com/BIC-MNI/libminc/blob/minc_lite/libsrc2/hyper.c#L776

and

https://github.com/BIC-MNI/libminc/blob/minc_lite/libsrc2/hyper.c#L1099



> > So, the question to MINC founding fathers - should MINC2 api be modified
> to
> > make sure that no inter-slice normalization happens when voxel type is
> > float, or is there any some other considerations?
>
> My understanding was that float/double MINC files don't do slice
> normalisation as it doesn't make sense. Float+Double filetypes specify
> a precision for your datatype, the range is irrelevant. So yes this
> should be removed. It was my understanding that if you convert a file
> to float/double using MINC tools the slice max/mins are discarded.
>

Nope, they are not - just try running mincreshape -float on a file with
slice normalization.

-- 
Best regards,

 Vladimir S. Fonov ~ vladimir <dot> fonov <at> gmail <dot> com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bic.mni.mcgill.ca/pipermail/minc-development/attachments/20130117/4055f4b3/attachment.html>


More information about the MINC-development mailing list