-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
retrieve voxel coords given segment id #649
Comments
Hi Jakob, Boy do I have the solution for you. I presume you are talking about the watershed volume like in #648 I've been working on creating a giant crackle file that contains the entirety of the fly dataset. The format has natively accelerated functions for computing contour point clouds and voxel counts. Example (once the file is produced on a big cluster.... that job is pending): import crackle
arr = crackle.aload("watershed.ckl", allow_mmap=True)
labels = arr.labels() # fast
ptc = arr.point_cloud() # This will take a while... 7045 * tens of seconds per slice? minutes?
cts = arr.voxel_counts() # will take a while 7045 * seconds per slice The downside is that this is currently single-core and the file being produced is 32x32x40 resolution. There are other ways to do this using cluster computing of course. You can see a sample of this for the flywire m783 segmentation here: (Note: You can decompress |
In my excitement, I neglected that there is a more prosaic way to accomplish most of these goals. Igneous supports computing the voxel count per an object which would give you both the labels and the voxel counts in a method compatible with cluster computing. This will generate an IntMap file that is essentially a searchable serialized dict. The final summing step will require quite some RAM though. |
This is very helpful. I am interested in learning how to use igneous for it since I likely will have to do it for a couple of different volumes.
The voxel count task would help me get a list of all labels in the volume, but it does not support sampling a sparse point cloud from the segmentation volume per segment, right? The crackle point cloud looks close to what I want. Is there a way to change the |
I am looking for a way to generate a list of voxel coordinates for a given segment ID. I want to use those voxel coordinates to sample a point cloud for each neuron. I explicitly do not want to use the vertices of meshes to sample the point cloud but sample from the volume directly.
I found something related to this issue, which recommends using 'cc3d'. My task is significantly related to counting the voxels of a particular segment, so I assume it is possible to get the list of voxel coordinates. Id also be happy already if I could find a way to sparsely sample from all voxel coordinates per segment. Could you help me understand how I could get started here?
The text was updated successfully, but these errors were encountered: