Very long computation time in Segment Editor when using Local threshold or Smoothing

Hi all,

I’m using the latest release of Slicer (5.2.1) on a Windows 11 system. My laptop and the lab’s workstation crashed every single time when I trying to use Local Threshold to build a model AND when trying to smooth the model. My laptop is 32GB RAM and the workstation is 64GB RAM. The datasets I was using range from 600Mb to 1.3GB so I don’t think it’s a memory issue.

Does anyone know what may be the problem? Thanks in advance.

Best,
Gening

@Sunderlandkyl as you know the Local Threshold effect best, could you investigate this problem report?

@Gening_Dong Please provide exact list of steps you perform to reproduce the issue. Use any of the Slicer sample data sets as a starting point. If the issue is not reproducible with any of those then share the data set you are using.

1 Like

Oh sorry there may be a format issue when I tried to reply by email.

The steps are as follow:

  1. Load NRRD files (3D images) as volumes
  2. Create new sequence, add the sequence to the browser
  3. Sequence registration - generic all (also weird, see the output volume below) (The issue can be reproducible without this step)
  4. Segment editor (Show 3D) – Local Threshold (default setting) – Ctrl + left click – CRASHED
    OR Segment editor (Show 3D) – Threshold – not crashed
  5. Smooth – Median or Close Hole - CRASHED

I tried to reproduce with the sample data CT Cardio Seq but the sample data worked well. So I share the dataset I was using as follow:
https://drive.google.com/drive/folders/1otxcbxQYskwuoqg24a1a6LvpmpEO7teL?usp=sharing

Thanks,
Gening

I’ve checked this on my computer and found that the application does not actually crash, just performs a lengthy computation. If you use the default 3mm kernel size that results in an incredibly large kernel (307x307x75 voxel). It is about 50000x larger than a usual 5x5x5 voxel kernel and accordingly it takes really long time to apply.

If your image scaling is correct (a voxel in your image is really just 10 micrometer) then you’ll need to adjust the default processing parameters to get reasonable results. For example, set your kernel size in Local threshold or Smoothing effect to around 0.08mm (9x9x3 voxel).

Thanks for the reply! My image scale is indeed pretty small so I think that’s the reason why the computation’s taking so long and generating weird results. Thanks for the advice, I’ll reduce the kernel size into a comparable value.