sknw icon indicating copy to clipboard operation
sknw copied to clipboard

try to overpass int16 restriction on image size

Open AlexeyTrekin opened this issue 3 years ago • 1 comments

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.

AlexeyTrekin avatar Nov 29 '21 14:11 AlexeyTrekin

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)

yxdragon avatar Dec 01 '21 14:12 yxdragon