Ultraliser icon indicating copy to clipboard operation
Ultraliser copied to clipboard

Split morphologies with multiple partitions into multiple objects

Open marwan-abdellah opened this issue 2 years ago • 1 comments

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 avatar Nov 21 '23 09:11 marwan-abdellah

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();

marwan-abdellah avatar Nov 21 '23 10:11 marwan-abdellah