Hi! I'm using ITK-SNAP to visualize segmentation results of individual nuclei in whole brain micrographs of zebrafish larvae. A typical 6 days post fertilization zebrafish brain has about 100K neurons and my segmentation algorithm gets almost all of the nuclei (yay!). The labels are stored in a 32-bit int image (numpy.int32, which I think is just a long int in C). Opening this image as a segmentation layer in ITK-SNAP is almost intractable, it takes 30 minutes+ to open. Just opening the image as the base (image) layer is fast - which makes sense, it's maybe 1.5GB uncompressed in RAM so not so huge. So the slow down must be in creating whatever internal object wraps individual labels, which is obviously necessary to have features like not painting one label over another etc. Anyway - I'm wondering if there are perhaps algorithmic ways to speed this up (e.g. make each label object more efficient some how), or multithread the label creation loop at load time, and give an option on the command line to specify the number of threads available (I can run this on a cluster if necessary), or perhaps GPU support?
As an aside - rendering the 3D view of so many labeled ROIs is also very slow. I'm guessing whatever algorithm maps voxel ROIs to surface meshes (marching cubes + smoothing?) is done sequentially over the labels? Perhaps this could also be multithreaded? Once generated, it is very slow to interact with the 3D viewer. Perhaps fewer vertices per label mesh (since there are so many ROIs, they are small, and pretty regular in shape) would help render faster? Once a mesh is created, if I export it and open it with Paraview then interacting with the dataset is real time - not sure what enables that in PV.