Pablo, Registration to F99 should not be impacted by issues of scaling. (For example, it doesn't affect our monkey-to-human registration despite large scale differences.) But if you want to rescale just for the sake of veridical representation, you can use caret_command -surface-apply-transformation-matrix or Surface: Tranform: Scale within Caret.
David On Jul 20, 2012, at 6:27 PM, Pablo Polosecki wrote: > Hi Donna, > > Your excerpts were really inspiring. Many many thanks. I got them > finally well-alligned. > One more question: My volumes and surfaces have a nominal resolution > of 1mm but they are actually .5mm (This means we scan at .5 mm > resolution but we have to trick FreeSurfer into thinking we scan at > 1mm because it doesn't display things correctly with other resolution > values). Does this matter for working in Caret and registering to F99? > Or do I have to rescale all my files back to .5mm? > > Thanks! > Pablo > > On Fri, Jul 20, 2012 at 5:12 PM, Donna Dierker <[email protected]> > wrote: >> Sorry I'm not as familiar with that script, but I am familiar with scripts >> we use for importing human freesurfer files into Caret. Hopefully these >> excerpts might help: >> >> #Find c_ras offset between FreeSurfer surface and volume and generate matrix >> to transform surfaces >> MatrixX=`$FreeSurferInstallationDirectory/bin/mri_info --cras >> $InputFreesurferSubjectDirectory/mri/orig.mgz | cut -f1 -d' '` >> MatrixY=`$FreeSurferInstallationDirectory/bin/mri_info --cras >> $InputFreesurferSubjectDirectory/mri/orig.mgz | cut -f2 -d' '` >> MatrixZ=`$FreeSurferInstallationDirectory/bin/mri_info --cras >> $InputFreesurferSubjectDirectory/mri/orig.mgz | cut -f3 -d' '` >> Matrix1=`echo "1 0 0 ""$MatrixX"` >> Matrix2=`echo "0 1 0 ""$MatrixY"` >> Matrix3=`echo "0 0 1 ""$MatrixZ"` >> Matrix4=`echo "0 0 0 1"` >> MatrixCRAS=`echo "$Matrix1"" ""$Matrix2"" ""$Matrix3"" ""$Matrix4"` >> >> for Surface in white pial ; do >> caret_command -surface-apply-transformation-matrix >> $OutputRootDir/$Subject/$InitialMeshDirectory/$Subject.$Hemisphere."$Surface"_orig.initial_mesh.coord.gii >> $OutputRootDir/$Subject/$InitialMeshDirectory/$Subject.$Hemisphere.initial_mesh.topo.gii >> >> $OutputRootDir/$Subject/$InitialMeshDirectory/$Subject.$Hemisphere."$Surface"_orig.initial_mesh.coord.gii >> -matrix $MatrixCRAS >> done >> >> Also, it might matter which volume you use (e.g., orig.mgz vs others). >> >> >> On Jul 20, 2012, at 3:55 PM, Pablo Polosecki wrote: >> >>> Hi Donna, >>> >>> I tried converting to RAS (this converst the heder information, which >>> apparently Caret does use) and the data matrix. The problem is the >>> same: the axes are correct (i.e., R points to the right side, D is >>> dorsal, etc). However, the surface and the volume still don't match in >>> Caret just like before. The issue seems to be some sort of offset in >>> the center of coordinates (when I click on the surface, the >>> highlighted points seem to be on a sensible medio-lateral and >>> dorso-ventral position. The problem is that the highlighted voxel is >>> too posterior in the volume view). Does this make sense or hint to a >>> possible solution to you perhaps? Worst case scenario, I could eyeball >>> how big this translation offset is, open the volume in matlab and have >>> it translate the data matrix. That way, it would roughly look okay, >>> but perhaps there is a more graceful way of handling this. >>> Thank you again, >>> Pablo >>> >>> On Fri, Jul 20, 2012 at 3:14 PM, Donna Dierker <[email protected]> >>> wrote: >>>> Be aware that what AFNI/Caret calls LPI, Freesurfer calls RAS. ;-) >>>> >>>> Can you try having mri_convert write the volume out as RAS, instead of >>>> LPI? Freesurfer will read the header and do the right flipping/rotating >>>> so that the surface aligns with it. Freesurfer did the right thing, as it >>>> understands that label. But that understanding is not what other software >>>> desires, in this case. (At least that's my read of your problem.) >>>> >>>> I think the axes don't need rotating anymore, but all three need flipping. >>>> >>>>> Dear List, >>>>> >>>>> I successfully completed the FS-to-F99 tutorial and now I am trying to >>>>> reproduce the steps with my own FreeSurfer dataset. According to the >>>>> FS-to-F99 tutorial, I need to have my mri volume "into LPI >>>>> orientation" and "the surfaces and volume need to be in register". My >>>>> original volume is in LIA orientation and is in register with my >>>>> surface, in the sense that when I open both on FreeSurfer's tkmedit >>>>> they are well-aligned to each other (I don't know how to check that >>>>> they are in register otherwise). If I use this surface and volume on >>>>> FS-to-F99's Stage-1 script and open the resulting spec file with >>>>> Caret, the volume's axes are wrong and the points on the surface and >>>>> in the volume don't match (I see this by clicking on the surface and >>>>> looking what is then highlighted on the volume window). If I transform >>>>> the volume into LPI orientation (using FreeSurfer's mri_convert >>>>> command), the new volume has the desired orientation and, >>>>> interestingly, it is still well-aligned to the surface in FreeSurfer's >>>>> tkmedit. However, when I use this surface and volume on the FS-toF99's >>>>> Stage-1 script, the volume and the surface are still not well-aligned, >>>>> even though the axes labels are now correct. How could I fix things so >>>>> that my volume and surface are in register when shown in Caret? >>>>> >>>>> Thank you very much, >>>>> Pablo >>>>> _______________________________________________ >>>>> caret-users mailing list >>>>> [email protected] >>>>> http://brainvis.wustl.edu/mailman/listinfo/caret-users >>>>> >>>> >>>> _______________________________________________ >>>> caret-users mailing list >>>> [email protected] >>>> http://brainvis.wustl.edu/mailman/listinfo/caret-users >>> _______________________________________________ >>> caret-users mailing list >>> [email protected] >>> http://brainvis.wustl.edu/mailman/listinfo/caret-users >> >> >> _______________________________________________ >> caret-users mailing list >> [email protected] >> http://brainvis.wustl.edu/mailman/listinfo/caret-users > _______________________________________________ > caret-users mailing list > [email protected] > http://brainvis.wustl.edu/mailman/listinfo/caret-users _______________________________________________ caret-users mailing list [email protected] http://brainvis.wustl.edu/mailman/listinfo/caret-users
