Grow from seed error — exceeded max number of voxels

I was trying to use the grow-from-seed effect in the Segment Editor module and keep encountering this error.

At first I thought this was due to not having enough RAM, thus I’ve increased my system’s memory from 195GB to 585GB, but the issue still persist.

Thus, it seems that I have hit the limitation of the grow-from-seed effect here? Is there any way to increase the max number of voxels?

Error output

self.extentGrowthRatio = 0.1
masterImageExtent = (0, 2183, 0, 1884, 0, 2229)
labelsEffectiveExtent = (0, 2183, 0, 1884, 0, 2229)
labelsExpandedExtent = [0, 2183, 0, 1884, 0, 2229]
"3D Slicer has caught an application error, please save your work and restart.\n\nIf you have a repeatable sequence of steps that causes this message, please report the issue following instructions available at https://slicer.org\n\n\nThe message detail is:\n\nException thrown in event: /work/Stable/Slicer-0-build/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.hxx:411:\nITK ERROR: FastGrowCut(0xca91e70): Image size is too large (9180553200 voxels). Maximum number of voxels is 4294967294."

Regarding Grow-from-Seed Limitation:

Your dataset dimensions (2184 × 1885 × 2230 ≈ 9.2 billion voxels) exceeds the practical limit of the grow-from-seed algorithm. This is not a memory issue but an algorithmic complexity issue:

  • Grow-from-seed has O(n³) to O(n⁴) complexity
  • Large datasets cause extremely slow computation or crashes

Recommended Solutions:

  1. Downsample: Resample the volume by 2x-4x before segmentation
  2. Crop ROI: Use Crop Volume to focus on the region of interest
  3. Use Alternative Methods:
    • Threshold segmentation (for bones like we did)
    • Deep learning (TotalSegmentator extension)
    • Level set / Region growing (with smaller seed regions)

Disclaimer

This AI assistant provides suggestions and code for 3D Slicer operations based on available information. Users are responsible for verifying the accuracy and appropriateness of any actions taken. The authors and developers assume no liability for any damage, data loss, or other issues that may arise from using these suggestions. Always save your work and back up important data before executing any operations. Medical imaging analysis results should be validated by qualified professionals before clinical use.

FROM: GitHub - jumbojing/slicerClaw: A revolutionary, lightning-fast AI assistant natively integrated into 3D Slicer. · GitHub

1 Like

This is the paper of the grow from seed module:

https://www.nature.com/articles/s41598-024-80206-7

As you can see it’s using an very efficient algorithm, but 2k*^3 pixel volume is really huge*… In the module, it has to store some floating number arrays of the same size of the original volume. If the original volume is uint8, this float type would be 4 times larger already…

1 Like