External Email - Use Caution
Thank you Bruce for your answer!
I figured out how to edit the wm.mgz. Indeed some parts of the skull were not
properly removed from the
brainmask and therefor considered as white matter. I manually removed voxels
from the wm.mgz and then I
tried to reintegrate the wm.mgz to the recon-all command by doing the mri_fill
<inputvol> <outputvol>.
Unfortunately I got this error:
mbuerger@beo-05:/data/projects/pediatric_mr_myelin/Evaluation_Milene/processed_with_freesurfer/FJ_2017042
5_T1/mri $ mri_fill wm.mgz filled.mgz
reading input volume...done.
searching for cutting planes...talairach transform
1.18336 0.13264 0.04891 10.53902;
-0.11077 0.95044 0.09947 -11.50818;
-0.00953 -0.18656 1.07681 -50.07034;
0.00000 0.00000 0.00000 1.00000;
INFO: Modifying talairach volume c_(r,a,s) based on average_305
voxel to talairach voxel transform
1.18336 0.04891 -0.13264 -14.02849;
-0.00953 1.07681 0.18656 15.85732;
0.11077 -0.09947 0.95044 6.22865;
0.00000 0.00000 0.00000 1.00000;
mri_fill: could not find valid seed for the cc
Looking for area (min, max) = (350, 1400)
area[0] = 9142 (min = 350, max = 1400), aspect = 0.54 (min = 0.10, max = 0.75)
need search nearby
using +/- offset search region where offset is 3.....
using +/- offset search region where offset is 6.....
using +/- offset search region where offset is 9.....
using +/- offset search region where offset is 12.....
area[0] = 597 (min = 350, max = 1400), aspect = 0.56 (min = 0.10, max = 0.75)
min_slice = -1, min_area = 65536
Looking for area (min, max) = (350, 1400)
area[0] = 1874 (min = 350, max = 1400), aspect = 0.53 (min = 0.10, max = 0.75)
need search nearby
using +/- offset search region where offset is 3.....
using +/- offset search region where offset is 6.....
using +/- offset search region where offset is 9.....
using +/- offset search region where offset is 12.....
using +/- offset search region where offset is 15.....
using +/- offset search region where offset is 18.....
using +/- offset search region where offset is 21.....
using +/- offset search region where offset is 24.....
using +/- offset search region where offset is 27.....
using +/- offset search region where offset is 30.....
using +/- offset search region where offset is 33.....
using +/- offset search region where offset is 36.....
using +/- offset search region where offset is 39.....
using +/- offset search region where offset is 42.....
using +/- offset search region where offset is 45.....
using +/- offset search region where offset is 48.....
mri_fill: could not find corpus callosum
Do you have any ideas?
Milène
Gesendet: Mittwoch, 13. Februar 2019 um 16:01 Uhr
Von: "Bruce Fischl" <fis...@nmr.mgh.harvard.edu>
An: "Freesurfer support list" <freesurfer@nmr.mgh.harvard.edu>
Betreff: Re: [Freesurfer] Fix topology correcting defect
Hi Milène
a couple of things. First, to view a surface in freeview you have to
specify that it is a surface with -f before the surface file name. So,
from the mri dir you could do:
freeview -v norm.mgz -f ../surf/lh.orig.nofix ../surf/lh.inflated.nofix
Second, how long did you wait? Big defects take a long time. You should
definitely look at your inflated and orig surfaces though to make sure that
some dramatic isn't wrong (like skull attached, or hemispheres not
separated) as your defect is probably too large to be an ordinary one that
the topo fixer will correct successfully.
cheers
Bruce
On Wed, 13 Feb 2019, "Milene Bürger" wrote:
>
> External Email - Use Caution
>
> Hi Freesurfers,
> I tried to run the recon-all command for several subjects of my study. It
worked out for all of them
> except for one. This one froze at fixing topology „Correcting defect“ 11 out
of 140 defects.
> I looked for advises in the mailing list but I can’t find any major problems
in the images that
> Freesurfer processed so far. The last correct file that I can open in
freeview, is filled.mgz (the
> skull and cerebellum are properly removed and it shows the two hemispheres
with 127 for rh and 255
> for lh). I can’t find the file "filled-pretess255.mgz“ which should be the
output, but I do have the
> files lh.orig.nofix and rh.orig.nofix for example. I tried to look at these
files, but freeview
> can't open them (failed to load MRI) so that I can’t see if there are
topological defects to correct
> as you described on one of the FsTutorials. I already tried to run only the
autorecon2 command, but
> the same freezing problem appeared at one point. I also tried to only use the
mri_pretess command
> with different options, but it didn’t work.
>
> I copied you the fix topology and what I tried with mri_pretess. I use
freesurfer version 6.0.1.
>
> Thanks a lot!
>
> Milène
>
>
mris_fix_topology-rusage/data/projects/pediatric_mr_myelin/Evaluation_Milene/processed_with_freesurfer/FJ_20170425_T1_Vers
u
> ch_Pretess/touch/rusage.mris_fix_topology.lh.dat -mgz -sphere qsphere.nofix
-g 1234
> FJ_20170425_T1_Versuch_Pretess lh
> reading spherical homeomorphism from 'qsphere.nofix'
> using genetic algorithm with optimized parameters
> setting seed for random number genererator to 1234
> *************************************************************
> Topology Correction Parameters
> retessellation mode: genetic search
> number of patches/generation : 10
> number of generations : 10
> surface mri loglikelihood coefficient : 1.0
> volume mri loglikelihood coefficient : 10.0
> normal dot loglikelihood coefficient : 1.0
> quadratic curvature loglikelihood coefficient : 1.0
> volume resolution : 2
> eliminate vertices during search : 1
> initial patch selection : 1
> select all defect vertices : 0
> ordering dependant retessellation: 0
> use precomputed edge table : 0
> smooth retessellated patch : 2
> match retessellated patch : 1
> verbose mode : 0
> *************************************************************
> INFO: assuming .mgz format
> $Id: mris_fix_topology.c,v 1.50.2.1 2016/10/27 22:25:58 zkaufman Exp $
> $Id: mrisurf.c,v 1.781.2.6 2016/12/27 16:47:14 zkaufman Exp $
> before topology correction, eno=-666 (nv=184736, nf=370804, ne=556206, g=334)
> using quasi-homeomorphic spherical map to tessellate cortical surface...
>
> Correction of the Topology
> Finding true center and radius of Spherical Surface...done
> Surface centered at (0,0,0) with radius 100.0 in 11 iterations
> marking ambiguous vertices...
> 92297 ambiguous faces found in tessellation
> segmenting defects...
> 151 defects found, arbitrating ambiguous regions...
> analyzing neighboring defects...
> -merging segment 3 into 2
> -merging segment 32 into 12
> -merging segment 94 into 12
> -merging segment 45 into 36
> -merging segment 53 into 37
> -merging segment 62 into 60
> -merging segment 81 into 70
> -merging segment 88 into 70
> -merging segment 144 into 132
> -merging segment 141 into 138
> -merging segment 150 into 147
> 140 defects to be corrected
> 0 vertices coincident
> reading
inputsurface/data/projects/pediatric_mr_myelin/Evaluation_Milene/processed_with_freesurfer/FJ_20170425_T1_Vers
u
> ch_Pretess/surf/lh.qsphere.nofix...
> reading brain volume from brain...
> reading wm segmentation from wm...
> Computing Initial Surface Statistics
> -face loglikelihood: -9.3516 (-4.6758)
> -vertex loglikelihood: -6.1930 (-3.0965)
> -normal dot loglikelihood: -3.5442 (-3.5442)
> -quad curv loglikelihood: -6.0556 (-3.0278)
> Total Loglikelihood : -25.1443
>
> CORRECTING DEFECT 0 (vertices=9329, convex hull=1902, v0=235)
> XL defect detected...
> After retessellation of defect 0 (v0=235), euler #=-122
(135106,396534,261306) : difference with
> theory (-137) = -15
> CORRECTING DEFECT 1 (vertices=47, convex hull=87, v0=788)
> After retessellation of defect 1 (v0=788), euler #=-121
(135129,396640,261390) : difference with
> theory (-136) = -15
> CORRECTING DEFECT 2 (vertices=1438, convex hull=465, v0=1311)
> XL defect detected...
> After retessellation of defect 2 (v0=1311), euler #=-119
(135552,398142,262471) : difference with
> theory (-135) = -16
> CORRECTING DEFECT 3 (vertices=24, convex hull=64, v0=9358)
> After retessellation of defect 3 (v0=9358), euler #=-118
(135563,398202,262521) : difference with
> theory (-134) = -16
> CORRECTING DEFECT 4 (vertices=35, convex hull=54, v0=11845)
> After retessellation of defect 4 (v0=11845), euler #=-117
(135574,398251,262560) : difference with
> theory (-133) = -16
> CORRECTING DEFECT 5 (vertices=68, convex hull=94, v0=12131)
> After retessellation of defect 5 (v0=12131), euler #=-116
(135584,398327,262627) : difference with
> theory (-132) = -16
> CORRECTING DEFECT 6 (vertices=66, convex hull=29, v0=12470)
> After retessellation of defect 6 (v0=12470), euler #=-115
(135586,398344,262643) : difference with
> theory (-131) = -16
> CORRECTING DEFECT 7 (vertices=29, convex hull=34, v0=16888)
> After retessellation of defect 7 (v0=16888), euler #=-114
(135587,398360,262659) : difference with
> theory (-130) = -16
> CORRECTING DEFECT 8 (vertices=66, convex hull=79, v0=16899)
> After retessellation of defect 8 (v0=16899), euler #=-113
(135625,398509,262771) : difference with
> theory (-129) = -16
> CORRECTING DEFECT 9 (vertices=219, convex hull=64, v0=16932)
> After retessellation of defect 9 (v0=16932), euler #=-112
(135644,398592,262836) : difference with
> theory (-128) = -16
> CORRECTING DEFECT 10 (vertices=69, convex hull=58, v0=19570)
> After retessellation of defect 10 (v0=19570), euler #=-111
(135659,398659,262889) : difference with
> theory (-127) = -16
> CORRECTING DEFECT 11 (vertices=18978, convex hull=4487, v0=19837)
>
>
>
> mri_pretess:
>
mbuerger@beo-05:/data/projects/pediatric_mr_myelin/Evaluation_Milene/processed_with_freesurfer/FJ_2
> 0170425_T1/mri $
rm/data/projects/pediatric_mr_myelin/Evaluation_Milene/processed_with_freesurfer/FJ_20170425_T1_Versu
> ch_Pretess/scripts/IsRunning.lh+rh
> rm: remove regular
file`/data/projects/pediatric_mr_myelin/Evaluation_Milene/processed_with_freesurfer/FJ_20170425_T1_Vers
> uch_Pretess/scripts/IsRunning.lh+rh'?
>
mbuerger@beo-05:/data/projects/pediatric_mr_myelin/Evaluation_Milene/processed_with_freesurfer/FJ_2
> 0170425_T1/mri $ mri_pretess -keep wm.mgz wm127 norm.mgz wm.mgz
> keeping edits
> Ambiguous edge configurations...
> Iteration Number : 1
> pass 1 (xy+): 0 found - 0 modified | TOTAL: 0
> pass 1 (xy-): 0 found - 0 modified | TOTAL: 0
> pass 1 (yz+): 0 found - 0 modified | TOTAL: 0
> pass 1 (yz-): 0 found - 0 modified | TOTAL: 0
> pass 1 (xz+): 0 found - 0 modified | TOTAL: 0
> pass 1 (xz-): 0 found - 0 modified | TOTAL: 0
> Iteration Number : 1
> pass 1 (+++): 0 found - 0 modified | TOTAL: 0
> pass 1 (+++): 0 found - 0 modified | TOTAL: 0
> pass 1 (+++): 0 found - 0 modified | TOTAL: 0
> pass 1 (+++): 0 found - 0 modified | TOTAL: 0
> Iteration Number : 1
> pass 1 (++): 0 found - 0 modified | TOTAL: 0
> pass 1 (+-): 0 found - 0 modified | TOTAL: 0
> pass 1 (--): 0 found - 0 modified | TOTAL: 0
> pass 1 (-+): 0 found - 0 modified | TOTAL: 0
> Total Number of Modified Voxels = 0 (out of 16189883: 0.000000)
> Searching for edits to keep ...
> kept 0 WM ON voxels
> kept 0 WM OFF voxels
> mri_pretess done
>
>
>
>_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer