Image-Py / sknw

build net work from skeleton image (2D-3D)
BSD 3-Clause "New" or "Revised" License
222 stars 47 forks source link

Variable edge buf size. int64 coordinates. #22

Open ausrasul opened 2 years ago

ausrasul commented 2 years ago

The edge buffer size is too small when dealing with large images. So I added the option to make it user defined.

Also when converting large images where the x,y coordinates are larger than the max value of int16, the coordinates become invalid/capped to the max value of int16. It is changed to int64.

jmon12 commented 1 year ago

@ausrasul Thank you for your quick fix, I was about to do something similar.

About the int16 issue, I didn't dive into the code yet, but why are you using int types instead of uint types? I suppose the index values must be positive. In that case, a uint32 would cover the same positive value range of int64 for two times less memory.

Is the concern about memory consumption a valid one? In the PR #19 tackling the same issue @yxdragon seems to acknowledge that.

I'll be testing your fork and give a feedback.

jmon12 commented 1 year ago

I've been testing your implementation @ausrasul with my data and encountered an other overflow, of uint16 this time. I opened a PR on your fork.