sknw
sknw copied to clipboard
try to overpass int16 restriction on image size
The current implementation is restricted to padded image size 32767 due to use of int16 for indexing, so I changed it to int32.
Maybe there should be a condition to use int32 only for bigger images? Didn't find out how to determine the size restriction inside this function.
just using int32, that is for the edge pixels, not very large. and in build_graph "os.round().astype(np.uint16)" need change int32 too.
and if the image is so large, there would be another question: in build_sknw we pad the image as uint16, and in parse_struc mark the node 1,2,3,4... if the image is too large, It may contains more than 65535 nodes So maybe wo need pad image as uint32. (cost 2 times memory, and the pad image is very large)