That did the trick! Thanks very much! Anthony
On 1/26/12 12:31 PM, Douglas N Greve wrote: > OK, try running > mri_label2vol --seg chuman_1_do.mgz --temp orig.mgz --regheader > chuman_1_do.mgz --o chuman_1_do.conf.mgz > Then load chuman_1_do.conf.mgz as a segmentation. > doug > > Anthony Dick wrote: >> Sorry Doug--it seems I misspoke. >> >> The following works, as you predicted, and these are the files that >> align in AFNI (had to convert chuman_1_do to .mgz): >> >> adick% tkmedit 01_do orig.mgz -overlay chuman_1_do.mgz -fthresh .5 >> INFO: No registration type specified for overlay, assuming identity. >> tkmedit: Trying to open ./chuman_1_do.dat >> Reading /Applications/freesurfer/tktools/tkm_common.tcl >> Reading /Applications/freesurfer/tktools/tkm_wrappers.tcl >> Reading /Applications/freesurfer/lib/tcl/fsgdfPlot.tcl >> Reading /Applications/freesurfer/tktools/tkUtils.tcl >> >> Loading the same file as a segmentation does not. This might give you >> some different ideas. >> >> Anthony >> >> On 1/26/12 11:36 AM, Douglas N Greve wrote: >>> What are the two things that align in AFNI? >>> doug >>> >>> Anthony Dick wrote: >>>> Hello Doug, >>>> >>>> Prof. Diedrichsen kindly shared the original brains he manually >>>> parcellated that were used to create his probabilistic atlas >>>> (http://www.icn.ucl.ac.uk/motorcontrol/imaging/propatlas.htm; see >>>> the 2009 Neuroimage paper). So each brain had an anatomy and a >>>> cerebellar parcellation, and these align in AFNI so I assumed there >>>> wasn't anything special about the parcellation process. However, I >>>> don't know the exact process he used to create them. So you're >>>> right, there is likely some intermediate step that I am missing. My >>>> goal here is to use them to create a training atlas for Freesurfer, >>>> which (if it works) we would like to share with the community. So >>>> all of your help here is appreciated! >>>> >>>> Here's where I am: The tkmedit command doesn't work (the cerebellum >>>> ends up in the same place--see image). Here was the output--is >>>> there a way to specify a registration file? Any ideas? Would >>>> knowing the intermediate steps help, or is there a way for me to >>>> try to troubleshoot this without bugging Prof. Diedrichsen? >>>> >>>> adick% tkmedit 01_do orig.mgz -overlay chuman_1_do_shft.nii >>>> -fthresh .5 >>>> INFO: No registration type specified for overlay, assuming identity. >>>> tkmedit: Trying to open ./chuman_1_do_shft.dat >>>> Reading /Applications/freesurfer/lib/tcl/tkm_common.tcl >>>> Reading /Applications/freesurfer/lib/tcl/tkm_wrappers.tcl >>>> Reading /Applications/freesurfer/lib/tcl/fsgdfPlot.tcl >>>> Reading /Applications/freesurfer/lib/tcl/tkUtils.tcl >>>> >>>> Thanks much for all the help so far, >>>> >>>> Anthony >>>> >>>> On 1/17/12 12:57 PM, Douglas N Greve wrote: >>>>> >>>>> 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 256 >>>>>> voxel 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 256 >>>>>> voxel 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 256 >>>>>> voxel 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 >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> >>>> _______________________________________________ >>>> Freesurfer mailing list >>>> Freesurfer@nmr.mgh.harvard.edu >>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer >>> >> >> > -- Anthony Steven Dick, Ph.D. Assistant Professor Department of Psychology Florida International University Modesto A. Maidique Campus DM 296B 11200 S.W. 8th Street Miami, FL 33199 Phone: 305-348-4202 (try this first) Lab Phone: 305-348-9057 or 305-348-9055 Fax: 305-348-3879 Email: ad...@fiu.edu Webpage: http://www.fiu.edu/~adick _______________________________________________ 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.