BlueBrain / NeuroM

Neuronal Morphology Analysis Tool
https://neurom.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
102 stars 55 forks source link

How can I get all the features results in the simple way? #1068

Open melancholy12 opened 1 year ago

melancholy12 commented 1 year ago

Here is my codes: import neurom.features as nf from neurom import load_neuron

neuron2 = load_neuron("/example data2.swc")

morph_features = nf.get(neuron2)

But it returns: TypeError: get() missing 1 required positional argument: 'obj'

So if I read the feature one by one, it seems to be fine. How can I get all the features?

arnaudon commented 1 year ago

Hello! You can use this: https://neurom.readthedocs.io/en/stable/morph_stats.html which has a configuration dictionary to select which features you want. The doc is for a cli, but you can use the python function directly: https://github.com/BlueBrain/NeuroM/blob/master/neurom/apps/morph_stats.py#L164 If you want all available features, you can create the config dict with this function: https://github.com/BlueBrain/NeuroM/blob/master/neurom/apps/morph_stats.py#L266 Good luck!