Hi Bruce,

Thank you so much for your help!
Best,

Jinsong

On Sun, Jul 24, 2016 at 6:46 AM, Bruce Fischl <fischl@nmr.mgh.harvard.edu> wrote:
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 ?

2. 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





_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.




--
Jinsong Tang, MD
Institute of Mental Health
The Second Xiangya Hospital , Central South University
139 Renmin Road, Changsha Hunan 410011, P.R. China