Hi Anthony, there's something I don't understand here. You said that ahuman_1_do_shft.nii was used as input to to create chuman_1_do_shft.nii, but they have different sizes, so something else is happening along the way, and this is causing the problem. One thing you can try first is to load chuman_1_do_shft.nii as an overlay instead of a segmentation. The segmentations much be in voxel-for-voxel alignment or things will get messed up, so
tkmedit 01_do orig.mgz -overlay chuman_1_do_shft.nii -fthresh .5
If this comes up in alignment, then Ithink I know where to go from there. doug
Anthony Dick wrote:
I ran mri_info--results at the bottom. I also ran mri_convert, but it did not save an output file (summary below).
The tkmedit command is: tkmedit 01_do orig.mgz, and then File > Load Segmentation to load chuman_1_do_shft.nii
I am attaching images of the alignment in AFNI. It does not align in mricron--I misspoke previously.
adick% mri_convert chuman_1_do_shft.nii --in_like rawavg.mgz chuman_1_do_shft_new.nii mri_convert chuman_1_do_shft.nii --in_like rawavg.mgz chuman_1_do_shft_new.nii reading info from rawavg.mgz... $Id: mri_convert.c,v 1.166.2.2 2010/08/10 19:11:50 greve Exp $ reading from chuman_1_do_shft.nii... TR=0.00, TE=0.00, TI=0.00, flip angle=0.00 volume sizes do not match
chuman_1_do_shft.nii: (width, height, depth, frames) = (145, 136, 102, 1)
rawavg.mgz: (width, height, depth, frames) = (160, 256, 256, 1) adick%
Volume information for chuman_1_do_shft.nii type: nii dimensions: 145 x 136 x 102 voxel sizes: 0.8083, 0.8083, 0.8083 type: SHORT (4) fov: 117.210 dof: 0 xstart: -58.6, xend: -58.6 ystart: -55.0, yend: -55.0 zstart: -41.2, zend: -41.2 TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN ras xform present xform info: x_r = -1.0000, y_r = -0.0000, z_r = -0.0000, c_r = 6.6335 : x_a = -0.0000, y_a = -1.0000, z_a = -0.0000, c_a = 59.5238 : x_s = 0.0000, y_s = 0.0000, z_s = 1.0000, c_s = -0.5958 Orientation : LPS Primary Slice Direction: axial
voxel to ras transform: -0.8083 -0.0000 -0.0000 65.2384 -0.0000 -0.8083 -0.0000 114.4912 0.0000 0.0000 0.8083 -41.8213 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 0.528187
ras to voxel transform: -1.2371 0.0000 0.0000 80.7063 0.0000 -1.2371 0.0000 141.6368 -0.0000 -0.0000 1.2371 51.7371 0.0000 0.0000 0.0000 1.0000
>
Volume information for orig.nii type: nii dimensions: 256 x 256 x 256voxel sizes: 1.0000, 1.0000, 1.0000 type: UCHAR (0) fov: 256.000 dof: 0 xstart: -128.0, xend: -128.0 ystart: -128.0, yend: -128.0 zstart: -128.0, zend: -128.0 TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN ras xform present xform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r = 6.5377 : x_a = 0.0000, y_a = 0.0000, z_a = 1.0000, c_a = 60.4280 : x_s = 0.0000, y_s = -1.0000, z_s = 0.0000, c_s = -1.5000 Orientation : LIA Primary Slice Direction: coronal
voxel to ras transform: -1.0000 0.0000 0.0000 134.5377 0.0000 0.0000 1.0000 -67.5720 0.0000 -1.0000 0.0000 126.5000 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform: -1.0000 0.0000 0.0000 134.5377 -0.0000 -0.0000 -1.0000 126.5000 -0.0000 1.0000 -0.0000 67.5720 0.0000 0.0000 0.0000 1.0000
>
Volume information for rawavg.mgz type: MGH dimensions: 160 x 256 x 256voxel sizes: 1.0000, 1.0000, 1.0000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -80.0, xend: 80.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN ras xform present xform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r = 6.5377 : x_a = 0.0000, y_a = -1.0000, z_a = 0.0000, c_a = 60.4280 : x_s = 0.0000, y_s = 0.0000, z_s = 1.0000, c_s = -1.5000
talairach xfm : Orientation : LPS Primary Slice Direction: axial
voxel to ras transform: -1.0000 0.0000 0.0000 86.5377 0.0000 -1.0000 0.0000 188.4280 0.0000 0.0000 1.0000 -129.5000 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 1
ras to voxel transform: -1.0000 0.0000 0.0000 86.5377 0.0000 -1.0000 0.0000 188.4280 -0.0000 -0.0000 1.0000 129.5000 0.0000 0.0000 0.0000 1.0000
Volume information for ahuman_1_do+orig.BRIK type: brik dimensions: 160 x 256 x 256voxel sizes: 1.0000, 1.0000, 1.0000 type: FLOAT (3) fov: 256.000 dof: 0 xstart: -80.0, xend: 80.0 ystart: -128.0, yend: 128.0 zstart: -128.0, zend: 128.0 TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees nframes: 1 PhEncDir: UNKNOWN ras xform present xform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r = 6.5377 : x_a = 0.0000, y_a = -1.0000, z_a = 0.0000, c_a = 60.4280 : x_s = 0.0000, y_s = 0.0000, z_s = 1.0000, c_s = -1.5000 Orientation : LPS Primary Slice Direction: axial
voxel to ras transform: -1.0000 0.0000 0.0000 86.5377 0.0000 -1.0000 0.0000 188.4280 0.0000 0.0000 1.0000 -129.5000 0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 1
ras to voxel transform: -1.0000 0.0000 0.0000 86.5377 0.0000 -1.0000 0.0000 188.4280 -0.0000 -0.0000 1.0000 129.5000 0.0000 0.0000 0.0000 1.0000
On 1/13/12 5:14 PM, Douglas N Greve wrote:
Which volumes align in AFNI? The orig.mgz and ahuman_1_do_shft.nii? I'm guessing not. Try this instead:
mri_convert chuman_1_do_shft.nii --in_like rawavg.mgz chuman_1_do_shft_new.nii
and see if you get alignment. If this does not work, make sure to send us the tkmedit command too. doug
Anthony Dick wrote:
It was created from the ahuman_1_do_shft.nii volume, which was what was input to recon-all in Freesurfer. And these volumes (the overlay and underlay) align in other viewers (e.g., AFNI and mricron).
On 1/13/12 2:40 PM, Douglas N Greve wrote:
What volume was human_1_do_shft.nii created from?
Anthony Dick wrote:
Here is the command, in case I didn't run it right.
adick% mri_convert chuman_1_do_shft.nii --in_like orig.mgz chuman_1_do_shft_new.nii mri_convert chuman_1_do_shft.nii --in_like orig.mgz chuman_1_do_shft_new.nii reading info from orig.mgz... $Id: mri_convert.c,v 1.179.2.2 2011/05/16 20:53:47 greve Exp $ reading from chuman_1_do_shft.nii... TR=0.00, TE=0.00, TI=0.00, flip angle=0.00 volume sizes do not match
chuman_1_do_shft.nii: (width, height, depth, frames) = (145, 136, 102, 1)
orig.mgz: (width, height, depth, frames) = (256, 256, 256, 1) adick%
An image of the tkmedit output is attached. Thanks for any suggestions.
Anthony
On 1/13/12 2:15 PM, Douglas N Greve wrote:
Try changing the header information in your parcellation, something like mri_convert yourparcellation.mgh --in_like orig.mgz yourparcellation.new.mgh doug
Anthony Dick wrote: > Good question. The parcellation is created outside of Freesurfer > (the data were shared from another lab and I don't know which > program they used to create the parcellation; of course I can > find out if this would be helpful). At any rate, the anatomy and > parcellation align when viewed in AFNI. > > Anthony > > On 1/13/12 2:11 PM, Douglas N Greve wrote: >> Hi Anthony, how are you creating the parcellation? Are you >> generating it off the orig.mgz? >> doug >> >> Anthony Dick wrote: >>> Hello, >>> >>> I am trying to train a cerebellar atlas based on 20 manually >>> parcellated cerebellums. I have run the anatomical through >>> freesurfer. When I try to load the overlay (parcellation) in >>> tkmedit, the underlay (e.g., orig.mgz, T1.mgz) and the overlay >>> (the parcellation) are no longer in alignment. >>> >>> However, loaded in AFNI the underlay and overlay of course >>> align. Is there a quick fix to get them in alignment? >>> >>> Anthony >>> >> > >