[MINC-users] volume_io

Anthonin Reilhac anthonin at biospective.com
Tue Aug 4 13:01:03 EDT 2009


Hi Andrew,

>
>
> > I would like to read a whole minc file (time,z,y,x) in one shot (using
> > input_volume) and save it back in one shot using ouput_volume().
> > When I do this, the min/max values per xy-slice the original file
> > contains are lost, and replaced by min/max values for the whole 4D
> volume.
> >
> > Is there a way to fix this?
>
> In short no. Your best bet is if you really really want to retain
> precision to this degree is to first convert the volume to float or
> double (either before you read in your volume or in your code). Once
> you have done this then slice scaling and max and min values become
> irrelevant.



Ok. Thanks for your answer.
Very helpful.




>
>
> > Also, I am trying a variant: I load the whole volume with
> > input_volume in a Volume variable and
> > save the same volume back (using the same Volume variable) in a new file,
> > xy-slice wise (using loops over time and z), with
> > output_volume_to_minc_file_position() function. But this does not work.
> > In this last variant, should the Volume passed to
> > output_volume_to_minc_file_position be of the dimension of the subset of
> > the whole volume we want to write on disk(of a xy-slice?) or
> > can it be of the dimension of the whole volume and we specify the part we
> > want to write with volumes_counts and file_start?
>
> I am not quite sure what you mean here. Perhaps post some code and I
> might be able to figure out exactly what you mean.


Yes me too, now that I have read it again ;)

Anthonin



>
>
>
> --
> Andrew Janke
> (a.janke at gmail.com || http://a.janke.googlepages.com/)
> Canberra->Australia    +61 (402) 700 883
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>


More information about the MINC-users mailing list