Re: [caret-users] LEFT HEM in FS-to-F99 Tutorial

2016-01-08 Thread Julia Sliwa
Hi Donna,

Thank you for your answer.

I processed the Left hemisphere again, this time successfully.
I figured out that when I was not editing any of the landmarks created
based on the results of the Right hemisphere the registration was looking
fine. From there I just moved on landmark by landmark and it worked. I am
not sure what I did differently from my first attempt, but as you suggested
there might have been some hidden crossovers in my previous landmarks.

Best,
Julia

-
Julia Sliwa, Ph.D.

Laboratory of Neural Systems
The Rockefeller University
1230 York Ave, New York, NY 10065


On Wed, Dec 23, 2015 at 2:23 PM, Donna Dierker 
wrote:

> Also, Julia, someone off-listed me these suggestions:
>
> 1) make a more inflated sphere, free of crossovers. general sphere
> optimisation.
> 2) be sure it's aligned correctly
> 3) remove landmarks and try with fewer, add in her own as appropriate.
> removing landmarks will fix this but it'll be less accurate. The issue is a
> landmark overlap deal type thing maybe.
>
> less landmarks maybe. "fewer lanmdarks". Whatever with your pedantry.
> could well work out. from memory.
>
> probably one landmark is causing this. Or not. it feels like intuition but
> it's not I think it's experience.
>
>
> On Dec 23, 2015, at 9:51 AM, Donna Dierker 
> wrote:
>
> > Hi Julia,
> >
> > I confess I don't know these scripts inside and out, but this image is
> enlightening:
> >
> >
> http://brainvis.wustl.edu/pipermail/caret-users/attachments/20151222/180ba486/attachment-0001.png
> >
> > It looks like there is a hole in the surface at the occipital pole --
> almost like perhaps Caret cut out what it thought was the medial wall, but
> it was really occipital cortex.  But that is not the only issue with the
> surface.  There are other holes.
> >
> > Have you looked at the input surface in Freesurfer?  Are there holes in
> it?  Is it in a non-standard orientation (x iincreases from left to right,
> y increases from posterior to anterior, z increases from inferior to
> superior)?
> >
> > Donna
> >
> >
> > On Dec 22, 2015, at 7:15 PM, Julia Sliwa 
> wrote:
> >
> >> Dear caret users,
> >>
> >> I am following the 'FS-to-F99 tutorial' and managed to process the
> right hemisphere so that it appears like Figure 10, and Left hemisphere
> until 3.4.
> >>
> >> I am now facing a problem at 3.6 where the superimposed individual and
> atlas coordinates appear in completely different positions. The script
> outcome seems ok and ends without error (see below).
> >>
> >> If I next run Stage-3.FS-toF99.sh the atlas and deformed individual
> landmarks appear completely distorted and I obtain the following outcome
> from the script (see below).
> >>
> >> Any help would be greatly appreciated
> >>
> >> Thank you and have a nice day
> >> Julia
> >>
> >>
> >>
> >> bash-3.2$ '/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/
> Stage-2B.FS-to-F99.sh'
> >> + . Params.FS-to-F99.txt
> >> ++ set -x
> >> ++ TUTORIAL=no
> >> ++ CASE=120810MILO
> >> ++ HEMISPHERE=left
> >> ++ VOXDIM=0.5
> >> ++
> ATLAS_DIR=/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET
> >> ++ CARET_DIR=/Freiwald/lab_files/opt/caret/
> >> ++ SPECIES=Macaque
> >> ++ NUMBER_NODES=78317
> >> + cp Params.FS-to-F99.txt
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/
> >> + export SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/
> >> + SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/
> >> ++ cut -c1
> >> ++ echo left
> >> ++ tr '[:lower:]' '[:upper:]'
> >> + HEM_FLAG=L
> >> ++ echo left
> >> ++ cut -c1
> >> + FS_HEM_PREFIX=lh
> >> + FS_HEM_PREFIX=/Freiwald/jsliwa/cooked/anatomicals//120810MILO/surf/lh
> >> + '[' L = L ']'
> >> + MATRIX='-1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
> 1.0'
> >> + caret_command -surface-apply-transformation-matrix
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.ATLAS.sphere.6.74k.coord
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.74k.topo
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.X-Flip.74k.coord
> -matrix -1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0
> >> + caret_command -surface-border-unprojection
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.X-Flip.74k.coord
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.74k.topo
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.F99.R.LANDMARKS.Reg-with-120810MILO.L.74k_f99.borderproj
> Macaque.F99.LANDMARKS-for-120810MILO.L.SPHERE.X-Flip.border
> >> + caret_command -surface-border-projection
> 120810MILO.L.SPHERICAL_STD.78317.coord 120810MILO.L.CLOSED.78317.topo
> Macaque.F99.LANDMARKS-for-120810MILO.L.SPHERE.X-Flip.border
> Macaque.F99.LANDMARKS-for-120810MILO.L.78317.borderproj
> >> + '[' no = yes ']'
> >> + sed /SPHERICALcoord_file/d 120

Re: [caret-users] LEFT HEM in FS-to-F99 Tutorial

2015-12-23 Thread Donna Dierker
Hi Julia,

I confess I don't know these scripts inside and out, but this image is 
enlightening:

http://brainvis.wustl.edu/pipermail/caret-users/attachments/20151222/180ba486/attachment-0001.png

It looks like there is a hole in the surface at the occipital pole -- almost 
like perhaps Caret cut out what it thought was the medial wall, but it was 
really occipital cortex.  But that is not the only issue with the surface.  
There are other holes.

Have you looked at the input surface in Freesurfer?  Are there holes in it?  Is 
it in a non-standard orientation (x iincreases from left to right, y increases 
from posterior to anterior, z increases from inferior to superior)?

Donna


On Dec 22, 2015, at 7:15 PM, Julia Sliwa  wrote:

> Dear caret users,
> 
> I am following the 'FS-to-F99 tutorial' and managed to process the right 
> hemisphere so that it appears like Figure 10, and Left hemisphere until 3.4.
> 
> I am now facing a problem at 3.6 where the superimposed individual and atlas 
> coordinates appear in completely different positions. The script outcome 
> seems ok and ends without error (see below).
> 
> If I next run Stage-3.FS-toF99.sh the atlas and deformed individual landmarks 
> appear completely distorted and I obtain the following outcome from the 
> script (see below).
> 
> Any help would be greatly appreciated
> 
> Thank you and have a nice day
> Julia
> 
> 
> 
> bash-3.2$ 
> '/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/Stage-2B.FS-to-F99.sh' 
> + . Params.FS-to-F99.txt
> ++ set -x
> ++ TUTORIAL=no
> ++ CASE=120810MILO
> ++ HEMISPHERE=left
> ++ VOXDIM=0.5
> ++ ATLAS_DIR=/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET
> ++ CARET_DIR=/Freiwald/lab_files/opt/caret/
> ++ SPECIES=Macaque
> ++ NUMBER_NODES=78317
> + cp Params.FS-to-F99.txt 
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/
> + export SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/
> + SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/
> ++ cut -c1
> ++ echo left
> ++ tr '[:lower:]' '[:upper:]'
> + HEM_FLAG=L
> ++ echo left
> ++ cut -c1
> + FS_HEM_PREFIX=lh
> + FS_HEM_PREFIX=/Freiwald/jsliwa/cooked/anatomicals//120810MILO/surf/lh
> + '[' L = L ']'
> + MATRIX='-1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0'
> + caret_command -surface-apply-transformation-matrix 
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.ATLAS.sphere.6.74k.coord
>  
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.74k.topo
>  
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.X-Flip.74k.coord
>  -matrix -1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0
> + caret_command -surface-border-unprojection 
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.X-Flip.74k.coord
>  
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.74k.topo
>  
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.F99.R.LANDMARKS.Reg-with-120810MILO.L.74k_f99.borderproj
>  Macaque.F99.LANDMARKS-for-120810MILO.L.SPHERE.X-Flip.border
> + caret_command -surface-border-projection 
> 120810MILO.L.SPHERICAL_STD.78317.coord 120810MILO.L.CLOSED.78317.topo 
> Macaque.F99.LANDMARKS-for-120810MILO.L.SPHERE.X-Flip.border 
> Macaque.F99.LANDMARKS-for-120810MILO.L.78317.borderproj
> + '[' no = yes ']'
> + sed /SPHERICALcoord_file/d 120810MILO.L.Stage-2.spec
> + mv 120810MILO.L.Stage-2.spec.rev 120810MILO.L.Stage-2.spec
> + echo SPHERICALcoord_file 120810MILO.L.SPHERICAL_STD.78317.coord
> + echo borderproj_file Macaque.F99.LANDMARKS-for-120810MILO.L.78317.borderproj
> + caret_command -scene-create 120810MILO.L.Stage-2.spec 
> 120810MILO.L.Stage-2.scene 120810MILO.L.Stage-2.scene '3. Compare 
> 120810MILO.L with F99 landmarks' -surface-overlay UNDERLAY SURFACE_SHAPE 
> 'Folding (120810MILO.L) Smooth_MW' -1 -show-borders -window-surface-types 
> WINDOW_MAIN 520 500 SPHERICAL CLOSED LATERAL -window-surface-types WINDOW_2 
> 520 500 SPHERICAL CLOSED MEDIAL
> 
> 
> 
> 
> + . Params.FS-to-F99.txt
> ++ set -x
> ++ TUTORIAL=no
> ++ CASE=120810MILO
> ++ HEMISPHERE=left
> ++ VOXDIM=0.5
> ++ ATLAS_DIR=/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET
> ++ CARET_DIR=/Freiwald/lab_files/opt/caret/
> ++ SPECIES=Macaque
> ++ NUMBER_NODES=78317
> + cp Params.FS-to-F99.txt 
> /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/
> + export SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99
> + SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99
> + cat
> ++ echo left
> ++ cut -c1
> ++ tr '[:lower:]' '[:upper:]'
> + HEM_FLAG=L
> ++ echo left
> ++ cut -c1
> + FS_HEM_PREFIX=lh
> + FS_HEM_PREFIX=/Freiwald/jsliwa/cooked/anatomicals/120810MILO/surf/lh
> + INCLUDE_FUNCTIONAL_MAP=no
> + sed '
> s#SPECIES#Macaque#g
> s#HEMISPHERE#left#g
> s#CASE#120810MILO#g
> s#space UNKNOWN#space #g
> ' /tmp/header.

Re: [caret-users] LEFT HEM in FS-to-F99 Tutorial

2015-12-22 Thread Julia Sliwa
Dear caret users,

I am following the 'FS-to-F99 tutorial' and managed to process the right
hemisphere so that it appears like Figure 10, and Left hemisphere until 3.4.

I am now facing a problem at 3.6 where the superimposed individual and
atlas coordinates appear in completely different positions. The script
outcome seems ok and ends without error (see below).

If I next run Stage-3.FS-toF99.sh the atlas and deformed individual
landmarks appear completely distorted and I obtain the following outcome
from the script (see below).

Any help would be greatly appreciated

Thank you and have a nice day
Julia



bash-3.2$ '/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/
Stage-2B.FS-to-F99.sh'
+ . Params.FS-to-F99.txt
++ set -x
++ TUTORIAL=no
++ CASE=120810MILO
++ HEMISPHERE=left
++ VOXDIM=0.5
++ ATLAS_DIR=/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET
++ CARET_DIR=/Freiwald/lab_files/opt/caret/
++ SPECIES=Macaque
++ NUMBER_NODES=78317
+ cp Params.FS-to-F99.txt
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/
+ export SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/
+ SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/
++ cut -c1
++ echo left
++ tr '[:lower:]' '[:upper:]'
+ HEM_FLAG=L
++ echo left
++ cut -c1
+ FS_HEM_PREFIX=lh
+ FS_HEM_PREFIX=/Freiwald/jsliwa/cooked/anatomicals//120810MILO/surf/lh
+ '[' L = L ']'
+ MATRIX='-1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0'
+ caret_command -surface-apply-transformation-matrix
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.ATLAS.sphere.6.74k.coord
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.74k.topo
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.X-Flip.74k.coord
-matrix -1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0
+ caret_command -surface-border-unprojection
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.X-Flip.74k.coord
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.sphere_6.RIGHT_HEM.74k.topo
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.F99.R.LANDMARKS.Reg-with-120810MILO.L.74k_f99.borderproj
Macaque.F99.LANDMARKS-for-120810MILO.L.SPHERE.X-Flip.border
+ caret_command -surface-border-projection
120810MILO.L.SPHERICAL_STD.78317.coord 120810MILO.L.CLOSED.78317.topo
Macaque.F99.LANDMARKS-for-120810MILO.L.SPHERE.X-Flip.border
Macaque.F99.LANDMARKS-for-120810MILO.L.78317.borderproj
+ '[' no = yes ']'
+ sed /SPHERICALcoord_file/d 120810MILO.L.Stage-2.spec
+ mv 120810MILO.L.Stage-2.spec.rev 120810MILO.L.Stage-2.spec
+ echo SPHERICALcoord_file 120810MILO.L.SPHERICAL_STD.78317.coord
+ echo borderproj_file
Macaque.F99.LANDMARKS-for-120810MILO.L.78317.borderproj
+ caret_command -scene-create 120810MILO.L.Stage-2.spec
120810MILO.L.Stage-2.scene 120810MILO.L.Stage-2.scene '3. Compare
120810MILO.L with F99 landmarks' -surface-overlay UNDERLAY SURFACE_SHAPE
'Folding (120810MILO.L) Smooth_MW' -1 -show-borders -window-surface-types
WINDOW_MAIN 520 500 SPHERICAL CLOSED LATERAL -window-surface-types WINDOW_2
520 500 SPHERICAL CLOSED MEDIAL




+ . Params.FS-to-F99.txt
++ set -x
++ TUTORIAL=no
++ CASE=120810MILO
++ HEMISPHERE=left
++ VOXDIM=0.5
++ ATLAS_DIR=/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET
++ CARET_DIR=/Freiwald/lab_files/opt/caret/
++ SPECIES=Macaque
++ NUMBER_NODES=78317
+ cp Params.FS-to-F99.txt
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/
+ export SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99
+ SUBJECTS_DIR=/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99
+ cat
++ echo left
++ cut -c1
++ tr '[:lower:]' '[:upper:]'
+ HEM_FLAG=L
++ echo left
++ cut -c1
+ FS_HEM_PREFIX=lh
+ FS_HEM_PREFIX=/Freiwald/jsliwa/cooked/anatomicals/120810MILO/surf/lh
+ INCLUDE_FUNCTIONAL_MAP=no
+ sed '
s#SPECIES#Macaque#g
s#HEMISPHERE#left#g
s#CASE#120810MILO#g
s#space UNKNOWN#space #g
' /tmp/header.7870.txt
+ echo CLOSEDtopo_file 120810MILO.L.CLOSED.78317.topo
+ echo FIDUCIALcoord_file 120810MILO.L.Midthickness_MWS.78317.coord
+ echo INFLATEDcoord_file 120810MILO.L.INFLATED.78317.coord
+ echo SPHERICALcoord_file 120810MILO.L.SPHERICAL_STD.78317.coord
+ echo borderproj_file 120810MILO.L.LANDMARKS.78317.borderproj
+ echo surface_shape_file 120810MILO.L.78317.surface_shape
+ echo area_color_file 120810MILO.L.AREAS.areacolor
+ echo border_color_file Macaque.LANDMARKS_for_FULL-HEM_July10.bordercolor
+ '[' no = yes ']'
+ echo

+ echo

+ cd /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99
+ '[' L = R ']'
+ '[' no = yes ']'
+ caret_command -surface-register-sphere-spec-only N
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.TEMPLATE.FS-to-F99.LVD.deform_map
120810MILO.L.For-Reg-with-F99.78317.spec
/Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/Macaque.F99.R.For-Registration-with-120810MILO.L.74k_f99.spec
Src/Tgt Different Hemispheres