You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a lot for such a great and versatile library!
I am having some trouble understanding the fact that skan is returning an array size for skan_obj.degrees < skan_obj.coordinates
Having inspected the images, everything appears to be correct except that!
Here is the error I am getting after launching this code line: for xyz in skan_skeleton.coordinates[skan_skeleton.degrees == 1]: skeleton_bis[int(xyz[0])-2:int(xyz[0])+2, int(xyz[1])-2:int(xyz[1])+2, int(xyz[2])-2:int(xyz[2])+2] = 2
IndexError: boolean index did not match indexed array along dimension 0; dimension is 1986 but corresponding boolean dimension is 1985
Is there an explanation for this?
Many thanks again!
The text was updated successfully, but these errors were encountered:
You're running into an issue that I am trying hard to fix in the next version: the coordinates contain a "dummy" value of 0, 0, 0 at the first (0th) position in the array. This is so that each skeleton pixel can directly index its corresponding coordinate (since background is 0, pixels start at 1).
To work around the issue, for now, do skan_skeleton.coordinates[1:][skan_skeleton.degrees == 1].
Hi @jni !
Thanks a lot for such a great and versatile library!
I am having some trouble understanding the fact that skan is returning an array size for skan_obj.degrees < skan_obj.coordinates
Having inspected the images, everything appears to be correct except that!
Here is the error I am getting after launching this code line:
for xyz in skan_skeleton.coordinates[skan_skeleton.degrees == 1]: skeleton_bis[int(xyz[0])-2:int(xyz[0])+2, int(xyz[1])-2:int(xyz[1])+2, int(xyz[2])-2:int(xyz[2])+2] = 2
IndexError: boolean index did not match indexed array along dimension 0; dimension is 1986 but corresponding boolean dimension is 1985
Is there an explanation for this?
Many thanks again!
The text was updated successfully, but these errors were encountered: