Working with in situ data#
This guide outlines strategies for analyzing in situ membrane segmentations using Mosaic, demonstrated on a Giardia lamblia dataset.
Segmentation#
Load your segmentation via File > Load Session. If you don’t have one, follow the membrane segmentation guide.
Tip
Load Session sets default values that optimize downstream processing and export.
For large datasets, adjust point rendering in Preferences > Appearance (Linux: High preset; macOS: Ultra or Adaptive).
Raw membrane segmentation#
Connected Components#
Separate the dataset into disjoint membrane partitions:
Select the segmentation in the Object Browser
In the Segmentation tab, configure Cluster:
Method: Connected Components
Use Points: Check
Drop Noise: Check
Distance: -1.0
Click Apply
Color by entity (View > Coloring > By Entity) to distinguish components.
Separated membrane components#
Tip
Distance -1 uses single-voxel connectivity. Increase to merge components separated by multiple voxels.
Refinement#
Remove small erroneous clusters using size-based filtering:
Click Select in the Segmentation tab
Adjust cutoffs to identify suitable size ranges (here, <25,000 voxels)
Click Remove
Size-based cluster filtering#
Tip
Manual editing is available via Actions > Pick Objects and Actions > Point Selection (or keyboard shortcuts). Use Trim for lamella editing.
Clustering#
Some membrane systems (e.g. double membranes) remain merged after connected components. Graph-based clustering can separate them.
Envelope Extraction#
Optionally thin membranes to their envelope first, reducing computation and improving separation:
Select the target cluster
Configure Cluster: Method: Envelope, Use Points: Check, Distance: -1.0, click Apply
Note
Check Drop Noise to add the inner membrane part as a second cluster.
Leiden Clustering#
Leiden clustering uses graph connectivity to separate membrane systems. The resolution parameter controls fineness — start at -7.3 and increase in steps of 1.0.
Here, resolution -7.3 yielded two clusters. Repeating at -6.3 for each produces the results below. Merge the resulting clusters into distinct membrane systems by selection.
Repeat for the remainder of the dataset.
Clustering applied to the entire dataset.#
Tip
When connectivity alone is insufficient, use distance-based methods like K-Means. DBSCAN and Birch can also work but are harder to tune.
Meshing#
Fit triangular meshes to analyze geometric properties:
Select membrane clusters in the Object Browser
In Parametrization, configure Mesh:
Method: Alpha Shape
Smoothness: 1.0, Curvature Weight: 1.0
Pressure: 0.0
Boundary Ring: 1, Alpha: 1.0
Changed in version v1.2.1: Elastic Weight renamed to Smoothness (rescaled). Volume Weight renamed to Pressure. Neighbors, Scaling Factor, and Distance were removed. Curvature Weight: 10.0 is sensible pre 1.2.1.
Click Apply
Alpha shapes work well for convex membrane morphologies. For non-convex membranes, use Ball Pivoting (e.g. with core-thinning via Segmentation > Skeletonize at radius 40, then Ball Pivoting at radius 50). Poisson reconstruction also produces complete meshes using a different completion strategy.
Changed in version v1.1.0: Thin was renamed to Skeletonize.
Analyze geometric properties via Segmentation > Properties:
Analyzing mesh properties.#