smistad / FAST

A framework for high-performance medical image processing, neural network inference and visualization
https://fast.eriksmistad.no
BSD 2-Clause "Simplified" License
433 stars 101 forks source link

SurfaceExtration crash for big volume( = 4GB ) #156

Closed feifeizuo closed 2 years ago

feifeizuo commented 2 years ago

Hi, I use surfaceextration for a large CT volume with size (dimx = 1903, dimy = 1024, dimz = 1069), type is ushort. but it's crash with

image

My PC have enough RAM and GPU Memory, why this happen ?

Thanks.

System:

Expected behavior SurfaceExtration work well for large ct.

smistad commented 2 years ago

There are limits to how large buffers can be in OpenCL. Try resizing your volume to 1024x1024x1024 before the surface extraction and see if that works.

C++ example:

auto resizer = ImageResizer::create(1024, 1024, 1024)
    ->connect(image);
auto extraction = SurfaceExtraction::create()
    ->connect(resizer);
feifeizuo commented 2 years ago

thanks smistad, I have try you solution. It works well.