[MINC-users] transfer integer from MNI to native space

Atsuko Nagano atsuko at bic.mni.mcgill.ca
Fri Oct 5 11:34:00 EDT 2007


Thank you Jason,

It works well, and the value of each ROI is homogeneous now.
However the value changes into integer to real number.
eg.  form 20 to 20.058

It occurs when I added -byte.

Can I change all the values into integers again?

Regards,
Atsuko

On 10/5/07, Jason Lerch <jason at bic.mni.mcgill.ca> wrote:
> If you are using mincresample to transfer the values back into native
> space, try using 'mincresample -nearest_neighbour'
>
> Otherwise there was a discussion on the minc-development list a while
> back about label volumes, which I suspect applies. I've pasted one
> message (from Claude Lepage) below in case it helps.
>
> Jason
>
> ====
>
> Hi,
>
>
> > > Correct, the way I have always done this is do a mincreshape to files
> > > that are misbehaving..
> > >
> > >    mincreshape -image_range 0 255 -valid_range 0 255 ...
> >
>
> This does not correct the problem if the min/max are set per slice and that
> they vary for each slice. Once a label file has been "decimalized" by the
> ranges, there is no way to recover the original values by the above
> operation.
>
> For example:
>    Take a label = 10, with voxel value of 10 if there is a one-to-one
> correspondence with voxel range and image real. Now assume that the slice
> has a min=0 and a max=61. That's 62 values over a 256 range, so each bin
> has a value of 62/256=0.2421875. The label 10 will be best approximated
> by the 41th bin with value 41*0.2421 = 9.9297. (There might be some
> ajustment to do if the values are range-centered, but my argument is still
> valid.) Setting back max=255 for the slice will not recover the original
> label 10. Now keep doing this repeatedly (minccalc, mincmath, etc) and
> some labels will change value (10 drifts to 9, for example).
>
> The option -keep_real_range in mincresample does the trick as the global
> min/max of the image are applied to each slice, thus not changing the
> internal voxel values. minccalc (which uses voxel_loop as AJ pointed out)
> does not.
>
> Despite being ugly, I also think that working in floats might be the best
> compromise (on the temporary files, of course).
>
> Claude
>
>
>
> Atsuko Nagano wrote:
> > Hello all,
> >
> > I have several ROIs with integers on one MNI space.
> > Then I transferred the ROI.mnc into native space for each subject.
> >
> > However, all integer changed into several values.
> > eg. MNI space: ROI A has the value of 33, Native space: ROI A has the
> > value between 9 to 33.
> >
> > I guess it is because of smoothing.
> > How can I get same value for each ROI in native space?
> >
> > Thank you,
> > Atsuko
> > _______________________________________________
> > MINC-users at bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>


More information about the MINC-users mailing list