seung-lab / cloud-volume

Read and write Neuroglancer datasets programmatically.
https://twitter.com/thundercloudvol
BSD 3-Clause "New" or "Revised" License
132 stars 47 forks source link

CATMAID Skeleton Support #237

Open unidesigner opened 5 years ago

unidesigner commented 5 years ago

I think having a plugin system as described here to mix different data sources will be very useful. I was thinking whether this would also provide the opportunity to have a CATMAID skeleton source, i.e. being able to fetch skeletons from a CATMAID server/API e.g. via existing Python libraries such as catpy or PyMaid?

One issue that I may arise are differing IDs for matching objects between source types, e.g. volumes and meshes. For instance, a skeleton ID in a CATMAID source might be different than the ID for its corresponding mesh from another data source. Would cloud-volume expect that the different sources provide the correct IDs that matches other sources, i.e. assumes equivalence in the mapping, or do you envision a kind of mapping infrastructure (such as a dict in the metadata object)?

william-silversmith commented 5 years ago

This is very much a welcome possibility. Currently, the way you would manage these differences is by manually passing the correct ID to each subsystem:

cv.mesh.get( $MESH_SUBSYSTEM_ID )
cv.skeleton.get( $SKELETON_SUBSYSTEM_ID )

The implementer is of course free to do whatever they want under the hood in terms of translating IDs in an unofficial plugin.

william-silversmith commented 5 years ago

PyMaid looks very sophisticated and useful. Thanks for the link! For what it's worth, since this project is BSD, it wouldn't be possible to directly include PyMaid in this project (it's GPL) though an extra plugin in another repository, with a different PyPI installation would be possible. I'm a fan of GPL and use it in other projects, but I don't feel it's appropriate for this one. I applaud Philipp for using it.

An official plugin using catpy would be tractable from a licensing perspective.

unidesigner commented 5 years ago

Okey, thanks for the clarification about translation of IDs. PyMaid from (@schlegelp) has much more to offer in terms of functionality - so for the purpose here of simply fetching a skeleton from the CATMAID API, catpy would probably be the way to go.

william-silversmith commented 5 years ago

@unidesigner A colleague recommended https://github.com/schlegelp/navis to me, which is the PyMaid functionality without the CATMAID dependency.

unidesigner commented 5 years ago

Thanks for the link - I already knew navis. It seems to be quite a nice package with potential to become one of the go-to solutions for neuron/circuit analyses in Python :)