Re: [Freesurfer] Custom ROI surface visualization

2014-07-22 Thread Buckley, Shannon
Aha Tksurfer, of course! 

Will follow up with Ruopeng about freeview, but tksurfer satisfies the goal 
nicely... 

Thank you! 

On Jul 22, 2014, at 7:53 AM, "Bruce Fischl"  wrote:

Hi Shannon

not sure about freeview, Ruopeng should be able to answer that part, but it 
should be easy enough in tksurfer. Just load the labels separately and give 
them whatever color you want.

cheers
Bruce

> On Mon, 21 Jul 2014, Shannon Buckley wrote:
> 
> Hi experts,
>  
> I’m trying to create a pretty picture via Freesurfer / freeview.
> Specifically, I have 6 regions that I want to combine into 2 rois (1 color
> for each 3-region-roi ) that would display over a gray-background. So in
> Freeivew, my goal is to see a gray pial surface with roiA displayed in red
> and roiB displayed as blue with all other labels present, but gray.
>  
> I’ve already read through the FAQ and attempted what I’ve seen work for
> others, but I seem to be hitting some kind of trouble and I’m not sure which
> steps / flags to adjust…
>  
> Here is what I’ve tried so far:
>  
> 1)  mri_annotation2label –surf pial –hemi rh –outdir ./roi
> a.   This got me all my rh.label files …
> 2)  Then I used: mri_mergelabels –i rh.insula.label –i rh.fusiform.label
> –i rh.isthmuscingulate.label –o rh.ins_fus_icing.label (and repeat this for
> the next roi, using different labels)
> a.   This got me a 2 new .label files that overlay great in Freeview if
> I load them individually on the rh.pial surface. The problem is that I can
> only seem to load ONE label at a time for the overlay, which does not meet
> my goal. So, to load multiple labels I tried combining them via…
> 3)  mris_label2annot --s $code --hemi rh 
> --ctab/home/vhasfcbuckls/Freesurfery/$code/label/roi/roi_added_bgGray.aparc.annot
> .ctab \
> --a newrois.graybg.aparc --l
> /home/vhasfcbuckls/Freesurfery/$code/label/roi/rh.ins_fus_icing.label \
> --l/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/rh.ling
> _tpole_parah.label
>  
> I’ve attached 2 screenshots: one where I’ve successfully loaded just ONE of
> the ROIs on the rh.pial (roiA_label_loaded.png); the other shows what I see
> after loading the product from step3 (annot_loaded_roiAB_graybg.png), which
> shows all 6 regions, but they aren’t grouped into 2 rois by color, and the
> background is black instead of gray. The annotation seems to think I only
> have the 2 regions indicated in the std out (below), which is unexpected. I
> feel like there is some flag I’m missing here…  
>  
> I’ve attached the modified ctab file used as an input to mris_label2annot,
> wherein I’ve appended my custom labels to the standard aparc.annot.ctab and
> assigned new RGB colors. All other regions were changed to 127 127 127 0 to
> make them gray.
>  
>  
> Question:
>  
> Can you please tell me which steps / flags/ inputs that need adjustments in
> order to reach my goal? Or is there a better tool / method that I should use
> for this visualization instead?
>  
>  
>  
> Please let me know if you need more information.
>  
> Thanks very much for your time,
>  
> ~Shannon
>  
> +
>  
> Here is the std out for step3:
>  
>
> mris_label2annot --s $code --h rh 
> --ctab/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/roi_add
> ed_GrayBG.aparc.annot.ctab --a newrois.graybg.aparc 
> --l/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/rh.ins_
> fus_icing.label 
> --l/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/rh.ling
> _tpole_parah.label
>  
> Using Freesurfer version 5.1.
>  
>   Subjects Directory is /home/vhasfcbuckls/Freesurfery
>   Sessions Directory is /home/vhasfcbuckls/sessions
>  
> Reading 
> ctab/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/roi_add
> ed_GrayBG.aparc.annot.ctab
> Number of ctab entries 38
>  
> $Id: mris_label2annot.c,v 1.17 2011/03/02 00:04:32 nicks Exp $
> cwd /home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi
> cmdline /opt/freesurfer5.1/bin/mris_label2annot --s
> PPMI_012_S_3181m00_i357579 --h rh 
> --ctab/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/roi_add
> ed_GrayBG.aparc.annot.ctab --a newrois.graybg.aparc 
> --l/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/rh.ins_
> fus_icing.label 
> --l/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/rh.ling
> _tpole_parah.label
> sysname  Linux
> hostname london.v21.med.va.gov
> machine  x86_64
> user vhasfcbuckls
>  
> subject PPMI_012_S_3181m00_i357579
> hemirh
> SUBJECTS_DIR /home/vhasfcbuckls/Freesurfery
> ColorTable/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/roi_add
> ed_GrayBG.aparc.annot.ctab
> AnnotName  newrois.graybg.aparc
> nlables 2
> LabelThresh 0 0.00
> Loading
> /home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/surf/rh.orig
> 1 8355711 bankssts
> 2

Re: [Freesurfer] Custom ROI surface visualization

2014-07-22 Thread Buckley, Shannon
Hi Ruopeng,

I just used the GUI while trying to figure this out... Was going to circle back 
to build a proper cmd line once I have the pieces I need. I was wondering if 
maybe my commands to build the annotation were faulty, but if it's just the 
version at issue then that's not so bad...

In any case, I loaded the rh.pial, then used the drop downs to load a label. I 
did the same with the annotation once I realized I could only load one label at 
a time. The annotation seemed "wrong" but perhaps it's just the display issue.

I'll see whether we can install the dev-build here since I usually use the 
official releases...

Thanks Ruopeng!

-Shannon

On Jul 22, 2014, at 8:00 AM, "Ruopeng Wang" 
mailto:rpw...@nmr.mgh.harvard.edu>> wrote:

Hi Shannon,

If I understand correctly, you are trying to load 2 ROIs on top of a layer of 
annotations on surface? Can you show me the freeview command you run? Or did 
you do everything on the GUI? BTW, are you using the latest dev build of 
freeview or the released one in v5.3? If I remember correctly, the dev build 
fixed some annotation display bugs.

Best,
Ruopeng

On Jul 21, 2014, at 6:34 PM, Shannon Buckley 
mailto:shannon.buck...@ucsf.edu>> wrote:

Hi experts,

I’m trying to create a pretty picture via Freesurfer / freeview. Specifically, 
I have 6 regions that I want to combine into 2 rois (1 color for each 
3-region-roi ) that would display over a gray-background. So in Freeivew, my 
goal is to see a gray pial surface with roiA displayed in red and roiB 
displayed as blue with all other labels present, but gray.

I’ve already read through the FAQ and attempted what I’ve seen work for others, 
but I seem to be hitting some kind of trouble and I’m not sure which steps / 
flags to adjust…

Here is what I’ve tried so far:

1)  mri_annotation2label –surf pial –hemi rh –outdir ./roi
a.   This got me all my rh.label files …
2)  Then I used: mri_mergelabels –i rh.insula.label –i rh.fusiform.label –i 
rh.isthmuscingulate.label –o rh.ins_fus_icing.label (and repeat this for the 
next roi, using different labels)
a.   This got me a 2 new .label files that overlay great in Freeview if I 
load them individually on the rh.pial surface. The problem is that I can only 
seem to load ONE label at a time for the overlay, which does not meet my goal. 
So, to load multiple labels I tried combining them via…
3)  mris_label2annot --s $code --hemi rh --ctab 
/home/vhasfcbuckls/Freesurfery/$code/label/roi/roi_added_bgGray.aparc.annot.ctab
 \
--a newrois.graybg.aparc --l 
/home/vhasfcbuckls/Freesurfery/$code/label/roi/rh.ins_fus_icing.label \
--l 
/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/rh.ling_tpole_parah.label

I’ve attached 2 screenshots: one where I’ve successfully loaded just ONE of the 
ROIs on the rh.pial (roiA_label_loaded.png); the other shows what I see after 
loading the product from step3 (annot_loaded_roiAB_graybg.png), which shows all 
6 regions, but they aren’t grouped into 2 rois by color, and the background is 
black instead of gray. The annotation seems to think I only have the 2 regions 
indicated in the std out (below), which is unexpected. I feel like there is 
some flag I’m missing here…

I’ve attached the modified ctab file used as an input to mris_label2annot, 
wherein I’ve appended my custom labels to the standard aparc.annot.ctab and 
assigned new RGB colors. All other regions were changed to 127 127 127 0 to 
make them gray.


Question:

Can you please tell me which steps / flags/ inputs that need adjustments in 
order to reach my goal? Or is there a better tool / method that I should use 
for this visualization instead?



Please let me know if you need more information.

Thanks very much for your time,

~Shannon

+

Here is the std out for step3:


mris_label2annot --s $code --h rh --ctab 
/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/roi_added_GrayBG.aparc.annot.ctab
 --a newrois.graybg.aparc --l 
/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/rh.ins_fus_icing.label
 --l 
/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/rh.ling_tpole_parah.label

Using Freesurfer version 5.1.

  Subjects Directory is /home/vhasfcbuckls/Freesurfery
  Sessions Directory is /home/vhasfcbuckls/sessions

Reading ctab 
/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/roi_added_GrayBG.aparc.annot.ctab
Number of ctab entries 38

$Id: mris_label2annot.c,v 1.17 2011/03/02 00:04:32 nicks Exp $
cwd /home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi
cmdline /opt/freesurfer5.1/bin/mris_label2annot --s PPMI_012_S_3181m00_i357579 
--h rh --ctab 
/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/roi_added_GrayBG.aparc.annot.ctab
 --a newrois.graybg.aparc --l 
/home/vhasfcbuckls/Freesurfery/PPMI_012_S_3181m00_i357579/label/roi/rh.ins_fus_icing.label
 --l 
/home