BlueBrain / Ultraliser

Reconstruction of watertight meshes, annotated volumes and center line skeletons of neuroscience spatial structures from non-watertight inputs, segmented masks, skeletons of NGV morphologies and volumes.
https://portal.bluebrain.epfl.ch
GNU General Public License v3.0
26 stars 5 forks source link

Split morphologies with multiple partitions into multiple objects #69

Open marwan-abdellah opened 11 months ago

marwan-abdellah commented 11 months ago

In order to be able to create full mouse brain vasculature datasets, we need a feature to split a single morphology object with multiple partitions into multiple morphology objects, where each object is processed individually.

marwan-abdellah commented 11 months ago

Implementation could use the AdvancedMesh API to construct a mesh object representing the morphology samples, and then split it into multiple meshes directly with the splitPartitions function.

// Load the mesh
std::unique_ptr<Ultraliser::AdvancedMesh> inputMesh =
            std::make_unique<Ultraliser::AdvancedMesh>(options->inputMeshPath);

// Split the partitions
std::vector < Ultraliser::AdvancedMesh* > partitions = inputMesh->splitPartitions();