refactoredCPPNeuronMesher
|
Python bindings for the CPPNeuronMesher library using pybind11. More...
Functions | |
PYBIND11_MODULE (neurongraph, m) | |
Python module definition for neurongraph. More... | |
Python bindings for the CPPNeuronMesher library using pybind11.
This file provides Python bindings for the NeuronGraph class and SWCNode structure, enabling Python users to access the full functionality of the CPPNeuronMesher library. The bindings expose all major operations including file I/O, morphology analysis, preprocessing, mesh operations, and trunk analysis.
The Python module can be imported as:
PYBIND11_MODULE | ( | neurongraph | , |
m | |||
) |
Python module definition for neurongraph.
m | The pybind11 module object |
This function defines the Python module 'neurongraph' and exposes all C++ classes and methods to Python. The module provides two main classes:
All method signatures are preserved from C++ to Python, with automatic type conversion handled by pybind11 for standard types (int, double, string, maps, vectors).
Python binding for SWCNode structure
Exposes the SWCNode C++ structure to Python, providing direct access to all neuron node properties. SWCNode represents a single point in a neuron morphology with spatial coordinates, topological relationships, and morphological type.
Python usage:
Python binding for NeuronGraph class
Exposes the complete NeuronGraph C++ class to Python, providing access to all neuron morphology analysis, processing, and I/O operations. This is the main class for working with neuron data in Python.
Python usage examples: