From anthonin at biospective.com Mon Jul 13 12:00:33 2009 From: anthonin at biospective.com (Anthonin Reilhac) Date: Mon, 13 Jul 2009 12:00:33 -0400 Subject: [MINC-development] Volume_io Message-ID: <44da421f0907130900u5101556dl27e86c4170ec8ed9@mail.gmail.com> Hi all, 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? 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? Thanks in advance. (sorry for possible duplicated msg). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www2.bic.mni.mcgill.ca/pipermail/minc-development/attachments/20090713/f880e7b1/attachment.htm From anthonin at bic.mni.mcgill.ca Fri Jul 10 15:55:35 2009 From: anthonin at bic.mni.mcgill.ca (Anthonin REILHAC) Date: Fri, 10 Jul 2009 15:55:35 -0400 Subject: [MINC-development] volume_io Message-ID: Hi all, 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? 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? Thanks in advance. Anthonin Reilhac McConnell Brain Imaging Centre, WB2B Montreal Neurological Institute 3801 University Montreal, Quebec, Canada phone: (514) 398 4965 From anthonin at bic.mni.mcgill.ca Mon Jul 13 10:20:39 2009 From: anthonin at bic.mni.mcgill.ca (Anthonin REILHAC) Date: Mon, 13 Jul 2009 10:20:39 -0400 Subject: [MINC-development] volume_io In-Reply-To: References: Message-ID: Hi all, 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? 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? Thanks in advance. (sorry for possible duplicated msg). Anthonin Reilhac McConnell Brain Imaging Centre, WB2B Montreal Neurological Institute 3801 University Montreal, Quebec, Canada phone: (514) 398 4965