Skeletonize Mask

Overview

This transform reduces a binary mask to a single-pixel-wide representation, preserving the essential structure of the shape.

Detailed Description

This [Data Transform Operation] uses an algorithm to find the “skeleton” of a mask. The skeleton is a thinned version of the original shape that is equidistant from its boundaries. This process is useful for simplifying complex shapes into a more straightforward representation, like converting a blob into a line or a set of lines. This operation is parameter-free.

The skeletonization process is applied to each time frame of the mask data independently.

Neuroscience Use Cases

  • Dendritic and Axonal Tracing: In microscopy images of neurons, skeletonization can simplify the complex structures of dendrites and axons into simple lines. This allows for easier analysis of branching patterns, length measurements, and tracing of neural pathways.
  • Vessel Analysis: When analyzing blood vessels in the brain (angiography), skeletonization can reduce the vessels to their centerlines, which simplifies the measurement of vessel length, tortuosity, and branching angles.
  • Animal Tracking: When tracking the shape of an animal’s body or tail from video, skeletonization can provide a simplified representation that is easier to analyze for postural changes or movements over time.

Parameters

This transform does not have any parameters. The underlying skeletonization algorithm is applied with default settings.

Example Configuration

Here is a complete example of a JSON configuration file that could be used to load mask data and then apply the skeletonization transform.

[
{
    "transformations": {
        "metadata": {
            "name": "Mask Skeletonization Pipeline",
            "description": "Test mask skeletonization on rectangular mask",
            "version": "1.0"
        },
        "steps": [
            {
                "step_id": "1",
                "transform_name": "Skeletonize Mask",
                "phase": "analysis",
                "input_key": "test_mask",
                "output_key": "skeletonized_mask",
                "parameters": {}
            }
        ]
    }
}
]