Computing statistics of clusters #115
-
First of all thank you for creating this super useful, straight-forward to use package. I have a couple of questions regarding the cc3d.statistics function, which I thought of adapting, but as I have no experience with cython/the algos behind the labelling I prefer to ask before doing anything:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi! Thanks for writing in.
The reason for this was I was attempting to be conservative with memory. The bounding boxes are
In your case, 0 is treated as background during CCL computation, so only the 0th index in statistics is background. All other entries are foreground. If for some reason you didn't want this behavior, I'd recommend adding 1 to the volume before putting it into ccl and then subtracting 1 from the results after.
That's the main trick. It might be interesting for me to integrate that into Will |
Beta Was this translation helpful? Give feedback.
-
cc3d 3.12.5 now supports uint32 sized axes in |
Beta Was this translation helpful? Give feedback.
Hi! Thanks for writing in.
The reason for this was I was attempting to be conservative with memory. The bounding boxes are
6 * (N + 1)
* data_width, which can become pretty large in the worst case (e.g. a volume where all the labels are different). Maybe I can automatically select uint32 when the dimensions are larger than uint16.