Hi Jinsong
if you use rawavg.mgz as the template ("--temp rawavg.mgz") the output will be resliced into that voxel space. Try using orig.mgz instead.
As for saving in int from matlab, I'm not sure we have anything to do so. You can always convert it using mri_convert
cheers Bruce
On Sat, 23 Jul 2016, Jinsong Tang wrote:
I have two questions" 1. the type of aparc+aseg.mgz file is INT(1). after save_mgh(v, 'aparc+aseg82regions.mgz',M,mr); I find the type of aparc+aseg82regions.mgz is FLOAT (3). How to save aparc+aseg82regions.mgz file in INT ?
- I want to convert the aparc+aseg82regions.mgz to .nii file (in native
space) I use the following command lines: mri_label2vol --seg aparc+aseg82regions.mgz --temp rawavg.mgz --o aparc+aseg82regions-rawavg.mgz --regheader aparc+aseg82regions.mgz mri_convert -odt int aparc+aseg82regions-rawavg.mgz aparc+aseg82regions-rawavg.nii
after these, I found the dimension is changed from 256*256*256 to 176*204*200. Volume information for aparc+aseg82regions.mgz type: MGH dimensions: 256 x 256 x 256 voxel sizes: 1.0000, 1.0000, 1.0000 type: FLOAT (3) fov: 256.000 dof: 1
Volume information for aparc+aseg82regions-rawavg.mgz type: MGH dimensions: 176 x 204 x 200 voxel sizes: 1.0000, 1.0000, 1.0000 type: INT (1) fov: 204.000 dof: 0
Volume information for aparc+aseg82regions-rawavg.nii type: nii dimensions: 176 x 204 x 200 voxel sizes: 1.0000, 1.0000, 1.0000 type: INT (1) fov: 176.000 dof: 0
I guess I must have done something wrong. But I can not figure out.
Best,
Jinsong