Print

Print


Dear Saad,

Again, thank you so much for your help.

Almost there, but I think I still need to reduce the number of vertices on
the surface. I found that this can be accomplished with mris_decimate, but
I now encountered te puzzling thing that tracking with the decimation takes
longer than without decimation. I hope you can help me out this last time,
then my pipeline is complete.

Again, my pipeline:

>> [annotation2label for each hemi]
mri_annotation2label --subject $WDir --hemi lh --outdir
$SUBJECTS_DIR/$WDir/FSlabels --annotation
$SUBJECTS_DIR/$WDir/label/lh.aparc.a2009s.annot

*>> [labels to path txt files, each containing the path to a label]*
for i in $(ls  *.label);
do
echo $(pwd)'/'$i > "${i%.*}".path&
done
wait

*>> [labels to surfaces for each hemi, using the gifti and path files]*
for i in $(ls  lh*.path);
do
label2surf --surf=../surf/lh.white.asc.gii --out="${i%.*}".asc --labels=$i&
done
wait

*>> for subcortical (First dir copied into subjects dir)*
for i in $(ls  *.vtk);
do
surf2surf --surfin=$i --surfout="${i%.*}"'.asc.gii' --convin=first
--convout=freesurfer --volin=$FirstBrain --outputtype=GIFTI_ASCII&
done
wait

*>> decimate the Freesurfer and first surface files*
*
*
* for i in $(ls  lh*.asc.gii);*
* do*
* mris_decimate -d 0.5 $i "${i%.asc.gii*}"'_decimated.asc.gii'&*
* done*
* wait*

This works perfectly for the subcortical files. If I load the decimated and
original sufaces in tksurface you clearly can see the differences and
tracking using only subcortical files takes precisely half the time.

If I load the labeled cortical surface files in TKsurfer (original or
decimated), I can't see the labels (You see the whole surface in grey), but
I'm confident that it works at full resolution, given the distributions of
fdt_path files I checked.

Tracking with the decimated *cortical *surfaces takes much longer. The
FDT_path files suggest that running mris_decimate on the labeled surface
files somehow leads to the complete surface file counting as a seed: so
less triangles, but all triangles count as a seed.

I'm puzzled how to solve this. I can't decimate rh.white and lh.white prior
to annotation2label, because the vertex numbers would be all wrong. Is it
label2surf not setting the non-label vertices to zero?


Thank you again,

Andries