On 07/30/2010 12:43 PM, Arslan, Ali wrote:
> Hi Donna,
> After I sent my first email, I was able to see the anatomical volume
> overlaid on the surface, just like visualizing a functional volume, by
> using the 'Map volume(s) to surfaces' tool.
> The results were not great because the surface and the volume didn't
> overlap at all.
> (please see the picture here)
> http://img686.imageshack.us/img686/7214/screenshot20100730at132.png
>
> So I took your suggestion and tried that transformation code you
> pasted. I couldn't complete it because there was a bus error, which is
> a hard to circumvent.
>
> echo $MATRIX
> 1.0 0.0 0.0 -0.43635 0.0 1.0 0.0 10.7291 0.0 0.0 1.0 15.8675 0.0 0.0 0.0 1.0
> caret_command -surface-apply-transformation-matrix lh.orig
> lh.orig.topo lh.orig.trans -matrix $MATRIX
> (I couldn't find in the documentation whether 'lh.orig.topo' part I
> wrote is an input or an output but I included it as a placeholder,
> there's no such file)
>   
Well, yeah, this assumes you have converted your lh.orig to Caret's 
coord and topo format.  If you have no topo file, then you need to 
import the Freesurfer surfaces into Caret first, and the lines in the 
preborder.sh file (link below) just below "import() {" tell you how to 
do that.

The name of the coord file in your screen capture suggests you opened 
the lh.orig directly in the GUI.  If you use File: Save Data file: Coord 
to save the coord, and File: Save Data file: Topology to save the topo, 
it will do the same thing as some of the import steps in the script.
> Can you suggest another tool to apply that transformation? Or do you
> have any idea what went wrong?
>   
You can probably use mris_convert to do the translation, but if your 
goal is to get these into Caret anyway, then you need to import the 
surfaces at some point.  Then you won't get a bus error.
> Couple of other questions:
> 1) Can I do this transformation manually, by nudging the surface or
> the volume or defining AC PC landmarks?
>   
You probably can adjust the volume's origin, using the offsets above.
> 2) I can't see the loaded volumes in the 'Map volume(s) to surfaces'
> tool's volume selection dialogue, so I have to read it from the disk
> again. This is the same if I use a spec file or if I load a surface
> and a volume by hand without a spec.
>   
The volume has to be already loaded for you to see it as an option in 
the mapper.
> 3) Even though surface and the volume are in different orientations,
> shouldn't I be able to see them (even though misaligned) in the
> Surface $ volume view?
>   
Based on your screen capture, I would expect you to see volume and 
surface in Surface + Volume view -- but it might depend on your volume 
settings.  The capture doesn't indicate anything about the anatomical 
volume's alignment with the surface (or lack thereof).  It only shows 
the functional intersection.  Is your functional volume turned on as an 
overlay in the volume settings?  Anatomical and functional volumes may 
not align.
> Best,
> Ali
>
>
> ---------------------
>
> Sometimes the volume orientation needs to be flipped to LPI, to match
> the surfaces. You can use either Freesurfer's mri_convert or AFNI's
> 3daxialize to do this.
>
> Typically, the surface needs a translation to align with the orig
> volume, e.g.:
>
> #################################################
> # Shift surface from Freesurfer space to orig
> #################################################
> X_OFFSET=`$FREESURFER_DIR/bin/mri_info --cras ../mri/orig.LPI.nii | cut
> -f1 -d' '`
> Y_OFFSET=`$FREESURFER_DIR/bin/mri_info --cras ../mri/orig.LPI.nii | cut
> -f2 -d' '`
> Z_OFFSET=`$FREESURFER_DIR/bin/mri_info --cras ../mri/orig.LPI.nii | cut
> -f3 -d' '`
> MATRIX="1.0 0.0 0.0 $X_OFFSET 0.0 1.0 0.0 $Y_OFFSET 0.0 0.0 1.0
> $Z_OFFSET 0.0 0.0 0.0 1.0"
> caret_command -surface-apply-transformation-matrix
> Human.$CASE.$HEM_FLAG.Midthickness.coor
> d Human.$CASE.$HEM_FLAG.topo
> Human.$CASE.$HEM_FLAG.Midthickness_orig.coord -matrix $MATRIX
>
> We have a standard import/preborder script for humans, but the monkey
> stuff tends to need tweaking:
>
> http://brainmap.wustl.edu/pub/donna/FREESURFER/SCRIPTS/2009_10/PALS_B12.LR/preborder.sh
> login pub
> password download
>
> Most of the subroutines in that script won't apply, but the import steps
> might be helpful.
>
>
>
> On Fri, Jul 30, 2010 at 10:21 AM, Arslan, Ali <[email protected]> wrote:
>   
>> Hi,
>> I've done a macaque brain reconstruction in Freesurfer and I would
>> like to be able to view those surfaces concurrently with the
>> anatomical volume in Caret. I've followed the steps in one of the
>> tutorials but SURFACE & VOLUME view only contains the anatomical
>> volume, even though I can see the surface by itself in its model view.
>>
>> I was wondering whether I'm missing any basic steps before being able
>> to view both data together. Can I be doing anything wrong when I'm
>> importing either one of the data?
>> Any help would be appreciated,
>> Ali Arslan
>>
>>     
> _______________________________________________
> 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

Reply via email to