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 <do...@brainvis.wustl.edu> 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 <do...@brainvis.wustl.edu> > 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 <jsl...@mail.rockefeller.edu> > 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.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 > >> Color ??? specified multiple times with different color components. > Using (170,170,170,2) > >> Color ??? specified multiple times with different color components. > Using (170,170,170,2) > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> Point is on nearest node. > >> WARNING: coordinate file > F99-registered.120810MILO.L.Midthickness_MWS.74k_f99.coord has 2361 > crossovers after deformation. > >> WARNING: coordinate file > F99-registered.120810MILO.L.INFLATED.74k_f99.coord has 6206 crossovers > after deformation. > >> WARNING: coordinate file > F99-registered.120810MILO.L.SPHERICAL_STD.74k_f99.coord has 56666 > crossovers after deformation. > >> + rm '*sphere_stage_*coord' > >> rm: cannot remove `*sphere_stage_*coord': No such file or directory > >> + cd /Freiwald/jsliwa/cooked/anatomicals/FS_to_caret_F99/F99_TARGET/ > >> + cat > >> + mkdir TEMP_RENAME > >> mkdir: cannot create directory `TEMP_RENAME': File exists > >> + mkdir BAK_RENAME > >> mkdir: cannot create directory `BAK_RENAME': File exists > >> + cp F99-registered.120810MILO.L.74k_f99.surface_shape > F99-registered.120810MILO.L.For-Reg-with-F99.74k_f99.spec > F99-registered.120810MILO.L.INFLATED.74k_f99.coord > F99-registered.120810MILO.L.LANDMARKS.74k_f99.borderproj > F99-registered.120810MILO.L.Midthickness_MWS.74k_f99.coord > F99-registered.120810MILO.L.SPHERICAL_STD.74k_f99.coord BAK_RENAME > >> + mv F99-registered.120810MILO.L.74k_f99.surface_shape > F99-registered.120810MILO.L.For-Reg-with-F99.74k_f99.spec > F99-registered.120810MILO.L.INFLATED.74k_f99.coord > F99-registered.120810MILO.L.LANDMARKS.74k_f99.borderproj > F99-registered.120810MILO.L.Midthickness_MWS.74k_f99.coord > F99-registered.120810MILO.L.SPHERICAL_STD.74k_f99.coord TEMP_RENAME > >> + cp rename_F99-registered.sh TEMP_RENAME > >> + cp rename_NUMBER_NODES-to-74k_f99.sh TEMP_RENAME > >> + cd TEMP_RENAME > >> + sh rename_F99-registered.sh > >> Replacing: F99-registered. > >> With: > >> Affected file: F99-registered.120810MILO.L.74k_f99.surface_shape > >> Affected file: F99-registered.120810MILO.L.For-Reg-with-F99.74k_f99.spec > >> Affected file: F99-registered.120810MILO.L.INFLATED.74k_f99.coord > >> Affected file: F99-registered.120810MILO.L.LANDMARKS.74k_f99.borderproj > >> Affected file: > F99-registered.120810MILO.L.Midthickness_MWS.74k_f99.coord > >> Affected file: F99-registered.120810MILO.L.SPHERICAL_STD.74k_f99.coord > >> Affected file: rename_F99-registered.sh > >> mv F99-registered.120810MILO.L.74k_f99.surface_shape > 120810MILO.L.74k_f99.surface_shape > >> mv F99-registered.120810MILO.L.For-Reg-with-F99.74k_f99.spec > 120810MILO.L.For-Reg-with-F99.74k_f99.spec > >> mv F99-registered.120810MILO.L.INFLATED.74k_f99.coord > 120810MILO.L.INFLATED.74k_f99.coord > >> mv F99-registered.120810MILO.L.LANDMARKS.74k_f99.borderproj > 120810MILO.L.LANDMARKS.74k_f99.borderproj > >> mv F99-registered.120810MILO.L.Midthickness_MWS.74k_f99.coord > 120810MILO.L.Midthickness_MWS.74k_f99.coord > >> mv F99-registered.120810MILO.L.SPHERICAL_STD.74k_f99.coord > 120810MILO.L.SPHERICAL_STD.74k_f99.coord > >> mv rename_F99-registered.sh rename_sh > >> + sh rename_NUMBER_NODES-to-74k_f99.sh > >> Replacing: 73730. > >> With: 74k_f99. > >> Affected file: 120810MILO.L.74k_f99.surface_shape > >> Affected file: 120810MILO.L.INFLATED.74k_f99.coord > >> Affected file: 120810MILO.L.Midthickness_MWS.74k_f99.coord > >> Affected file: 120810MILO.L.SPHERICAL_STD.74k_f99.coord > >> Affected file: rename_NUMBER_NODES-to-74k_f99.sh > >> mv *73730.* 120810MILO.L.74k_f99.surface_shape > 120810MILO.L.74k_f99.surface_shape.rev > 120810MILO.L.For-Reg-with-F99.74k_f99.spec > 120810MILO.L.INFLATED.74k_f99.coord 120810MILO.L.INFLATED.74k_f99.coord.rev > 120810MILO.L.LANDMARKS.74k_f99.borderproj > 120810MILO.L.Midthickness_MWS.74k_f99.coord > 120810MILO.L.Midthickness_MWS.74k_f99.coord.rev > 120810MILO.L.SPHERICAL_STD.74k_f99.coord > 120810MILO.L.SPHERICAL_STD.74k_f99.coord.rev > rename_NUMBER_NODES-to-74k_f99.sh rename_NUMBER_NODES-to-74k_f99.sh.rev > >> mv: target `rename_NUMBER_NODES-to-74k_f99.sh.rev' is not a directory > >> + mv 120810MILO.L.74k_f99.surface_shape > 120810MILO.L.74k_f99.surface_shape.rev > 120810MILO.L.For-Reg-with-F99.74k_f99.spec > 120810MILO.L.INFLATED.74k_f99.coord 120810MILO.L.INFLATED.74k_f99.coord.rev > 120810MILO.L.LANDMARKS.74k_f99.borderproj > 120810MILO.L.Midthickness_MWS.74k_f99.coord > 120810MILO.L.Midthickness_MWS.74k_f99.coord.rev > 120810MILO.L.SPHERICAL_STD.74k_f99.coord > 120810MILO.L.SPHERICAL_STD.74k_f99.coord.rev .. > >> + cd .. > >> + rm TEMP_RENAME/rename_NUMBER_NODES-to-74k_f99.sh TEMP_RENAME/rename_sh > >> + rmdir TEMP_RENAME > >> rmdir: TEMP_RENAME: Directory not empty > >> + cp 120810MILO.L.For-Reg-with-F99.74k_f99.spec BAK_RENAME > >> + mv 120810MILO.L.For-Reg-with-F99.74k_f99.spec > 120810MILO.L.Registered-to-F99.74k_f99.spec > >> + echo scene_file Macaque.F99.R.Reg-with-120810MILO.L.scene > >> + sed '/scene_file Macaque.F99.TEMPLATE_LANDMARKS.scene/d' > 120810MILO.L.Registered-to-F99.74k_f99.spec > >> + mv 120810MILO.L.Registered-to-F99.74k_f99.spec.rev > 120810MILO.L.Registered-to-F99.74k_f99.spec > >> + sed '/volume_anatomy_file Macaque.F99.LR.nii.gz/d' > 120810MILO.L.Registered-to-F99.74k_f99.spec > >> + mv 120810MILO.L.Registered-to-F99.74k_f99.spec.rev > 120810MILO.L.Registered-to-F99.74k_f99.spec > >> + caret_command -surface-distortion Macaque.ATLAS.sphere.6.74k.coord > 120810MILO.L.SPHERICAL_STD.74k_f99.coord > Macaque.sphere_6.RIGHT_HEM.74k.topo 120810MILO.L.74k_f99.surface_shape > 120810MILO.L.74k_f99.surface_shape -generate-areal-distortion > -areal-distortion-column-name 'Spherical distortion deformed 120810MILO.L > vs F99.R sphere' > >> + caret_command -scene-create > 120810MILO.L.Registered-to-F99.74k_f99.spec '' > Macaque.F99.R.Reg-with-120810MILO.L.scene '1. 120810MILO.L registered to > F99 (individual and atlas landmarks with spherical distortion map)' > -surface-overlay PRIMARY PAINT 'MEDIAL.WALL (July10 Both hems)' -1 > -surface-overlay UNDERLAY SURFACE_SHAPE 'Spherical distortion deformed > 120810MILO.L vs F99.R sphere' -1 -show-borders -window-surface-types > WINDOW_MAIN 520 500 SPHERICAL CLOSED LATERAL -window-surface-types WINDOW_2 > 520 500 FIDUCIAL CLOSED LATERAL > >> > >> --------------------------------------------- > >> Julia Sliwa, Ph.D. > >> Laboratory of Neural Systems > >> The Rockefeller University > >> 1230 York Ave, New York, NY 10065 > >> > >> > >> _______________________________________________ > >> caret-users mailing list > >> caret-users@brainvis.wustl.edu > >> http://brainvis.wustl.edu/mailman/listinfo/caret-users > > > > > > _______________________________________________ > > caret-users mailing list > > caret-users@brainvis.wustl.edu > > http://brainvis.wustl.edu/mailman/listinfo/caret-users > >
_______________________________________________ caret-users mailing list caret-users@brainvis.wustl.edu http://brainvis.wustl.edu/mailman/listinfo/caret-users