-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some attributes are not described in the docs #49
Comments
Hi I am trying to make use of your nice tool (would say more than just a tool) , I am using basic exaples just to find FilFinder2D.skeleton_longpath, is there any way to get the lenght of it in pixels ? I tried branch_lenghts but is just sizes of the various segment found and cannot use them because I dont know which were selected for theh skelethon_longpath , unless I need tu sum them all because these are just the ones selected to create the seleton ? I can get the number of pixels with np.where(skeleton.longpath == 1) or np.sum(mask) but that won't be the Euclidean distance for pixel neighbor on a diagonal (1,4 vs 1) |
Hi @pippo1990 -- you're looking for this function to get the longest path lengths: https://fil-finder.readthedocs.io/en/latest/api/fil_finder.FilFinder2D.html#fil_finder.FilFinder2D.lengths |
dodgy I can run print('\nfil.branch_lenghts() : ' , fil.branch_lengths()) but print('\nfil.lenghts() : ' , fil.lenghts()) gives AttributeError: 'FilFinder2D' object has no attribute 'lenghts' I am on fil_finder.version : 1.7.2 |
Just checking: was the |
yep sorry, my right hand is faster than the left one sorry, It's working now |
for one of my test fil.lengths is in between the number of pixel and the geometric distance calculated on the skeleton_longpath by hand (pixel_to_pixel) i.e. : my measures length 1315.8813844421359 vs number of pixels 1128 while fil.lengths is fil.lenghts() : [1298.91082169] pix any reason about that , is it geometric lenght ? I am not able to interpret the filament.py part describing lenght: line 331 filament.py |
There can be a moderate discrepancy between the geometric length and the one filfinder finds from the longest path. FilFinder generalizes the identification of the intersections between branches along the longest path to allow them to be made up of several pixels. The distance it uses if then a median of the intersection pixels, added to the geometric distances along each branch. There's also an option when running |
thanks for your nice and complete explanation |
Some properties in FilFinder2D are not described in the docs (i.e.
FilFinder2D.skeleton_longpath
).The text was updated successfully, but these errors were encountered: