morphonets / SNT

The ImageJ framework for quantification of neuronal anatomy
https://imagej.net/plugins/snt
GNU General Public License v3.0
42 stars 18 forks source link

Make AllenCompartment: Make isChild() isParent() methods more robust #130

Closed tferr closed 1 year ago

tferr commented 2 years ago

@carshadi , could you please have a look at this?

I noticed some really weird results of AllenCompartment#isChildOf() #isParentOf() even after your improvements with https://github.com/morphonets/SNT/pull/119, I am looking into them now (these were json files converted adhoc from SWCs [maybe something went awry there])

I think a problem could arise with the methods treating the full structure ID path, rather than just the upstream list (when looking for parents) or downstream (when looking for children) of the actual compartment. Could you please have a look? Or maybe you have some better ideas on how to make this fool-proof?

tferr commented 1 year ago

@carshadi , trying to cleanup old issues/PRs, so a gentle reminder on this. If you don't have the time or the bandwidth to look at this, No prob at all

carshadi commented 1 year ago

The index in the substring call needs to be incremented, but otherwise looks good!