Hi Thomas

 

Can you check the input images? I’ve seen this happen when e.g. the skull stripping failed and the images are blank

 

Cheers

Bruce

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Thomas Kaufmann
Sent: Wednesday, October 9, 2024 1:37 PM
To: Freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Error During T2/FLAIR Pial Surface Refinement

 

        External Email - Use Caution        

Hello FreeSurfer Developers,

 

I'm attempting to refine pial surfaces with T2/FLAIR images as described here (MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://surfer.nmr.mgh.harvard.edu/fswiki/recon-all#UsingT2orFLAIRdatatoimprovepialsurfaces). For some of my subjects I get the following error during the mris_place_surface subprocess when I run recon-all:

 

    error: MRIhistogramLabelRegion: constant image

    error: MRIhistogramLabelRegion: constant image

    Segmentation fault

 

The error occurs independent of whether I process T1 and T2 images together with -all or if I run only -autorecon3 with the T2 or FLAIR images added.

 

I've searched the list and while similar errors have been reported, no solutions have been proposed. Does anyone have any thoughts on how to troubleshoot this one?

 

1) FreeSurfer version: freesurfer-macOS-darwin_x86_64-7.4.1-20230614-7eb8460

2) Platform: macOS Sonoma 14.6.1

3) uname -a: Darwin MacBook-Air-M3 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8122 arm64

4) recon-all.log: relevant section below

 

Thank you!

Thomas

 

 

mris_place_surface --adgws-in ../surf/autodet.gw.stats.lh.dat --seg aseg.presurf.mgz --wm wm.mgz --threads 8 --invol brain.finalsurfs.mgz --lh --i ../surf/lh.pial.T1 --o ../surf/lh.pial.T2 --pial --nsmooth 0 --rip-label ../label/lh.cortex+hipamyg.label --pin-medial-wall ../label/lh.cortex.label --white-surf ../surf/lh.white --aparc ../label/lh.aparc.annot --repulse-surf ../surf/lh.white --mmvol T2.mgz T2 

 

Reading in input surface ../surf/lh.pial.T1

Not smoothing input surface

Area    280714  0.42434  0.32508 0.000178   6.1090

Corner  842142 60.00000 30.99319 0.049953 179.7466

Edge    421071  1.04711  0.48130 0.006015   7.4374

Hinge   421071 18.87838 25.11022 0.000011 179.9979

Reading white surface coordinates from ../surf/lh.white

Reading repulsion surface coordinates from ../surf/lh.white

Reading in aparc ../label/lh.aparc.annot

[DEBUG] CTABreadFromBinaryV2(): ct->nentries=36, num_entries_to_read=36

Reading in input volume brain.finalsurfs.mgz

Reading in seg volume aseg.presurf.mgz

Reading in wm volume wm.mgz

MRIclipBrightWM(): nthresh=15378, wmmin=5, clip=110 

MRIfindBrightNonWM(): 1814 bright non-wm voxels segmented.

Masking bright non-wm for pial surface mid_gray = 67.5589

MRImask(): AllowDiffGeom = 1

MRImask(): AllowDiffGeom = 1

MRImask(): AllowDiffGeom = 1

Ripping frozen voxels

Ripping vertices not in label ../label/lh.cortex+hipamyg.label

MRISripNotLabel() ripped 6543/140359 vertices (133816 unripped)

INFO: rip surface needed but not specified, so using input surface

Ripping segs (eg, WMSA, BG, frozen)

Starting MRISripSegs() d = (-2 2 0.5) segnos: 247 

MRISripSegs(): -2 2 0.5 ripped 0

Reading in multimodal volume T2.mgz

 using multi modal weights 

vertex 70180: xyz = (-39.3637,-26.8713,28.9107) oxyz = (-42.1603,-27.2597,31.4024) wxzy = (-42.1603,-27.2597,31.4024) pxyz = (-39.3637,-26.8713,28.9107) 

CBVO Creating mask 140359

n_averages 4

Iteration 0 =========================================

n_averages=4, current_sigma=2

Computing pial target locations using multimodal (1)

starting MRIScomputePialTargetLocationsMultiModal()

max_outward_dist = 3, sample_dist = 0.1, pix_size = 1, whalf = 7

T2_min_inside = 110, T2_max_inside 300, T2_min_outside = 130, T2_max_outside 300

inside_peak_pct = 0.1, 0.01, outside_peak_pct = 0.5, 0.5

wm_weight = 3, nlabels=0, contrast_type=1

Changed 198177 aseg cortex voxels to 0

Creating lowres distance volumes t=0.0164299

Creating white distance volumes t=0.307498

(box.dx, box.dy, box.dz) = (132, 242, 326)

(region->dx, region->dy, region->dz) = (132, 242, 326)

(region->dx, region->dy, region->dz) = (132, 242, 326)

Creating pial distance volumes t=0.609579

(box.dx, box.dy, box.dz) = (144, 256, 336)

(region->dx, region->dy, region->dz) = (144, 256, 336)

(region->dx, region->dy, region->dz) = (144, 256, 336)

locating cortical regions not in interior range [110.0 --> 300.0], and not in exterior range [130.0 --> 300.0]

t = 0.984043

Starting loop over 140359 vertices

   vno = 0, t = 0.984043

error: MRIhistogramLabelRegion: constant image

error: MRIhistogramLabelRegion: constant image

Segmentation fault