anatomy.ClassifierAtlas
anatomy.ClassifierAtlas(**kwargs)The Encoding Atlas is a version of the Allen Atlas where the regions labels volume is reworked.
Voids inside the skull are relabeled to a new region. This is done by computing the convex hull of the non-void labels and then splitting the void in two regions: one below the convex hull and one above.
Methods
| Name | Description |
|---|---|
| assign_voids_inside_skull | Identifies and relabels void voxels that are inside the skull. |
| compute_surface | Compute the convex hull of the surface of the brain. |
assign_voids_inside_skull
anatomy.ClassifierAtlas.assign_voids_inside_skull()Identifies and relabels void voxels that are inside the skull.
This method creates a mask of the brain’s convex hull and identifies all voxels below this hull. Any voxels that were previously labeled as void (0) and are below the convex hull are relabeled as the new ‘void_fluid’ region.
The process involves: 1. Finding non-NaN points on the convex top surface 2. Creating a 3D mask of the convex hull 3. Using cumulative sum to identify all voxels below the hull 4. Adding the new void_fluid region to the brain regions 5. Relabeling appropriate voxels with the new region ID
Args: None
Returns: None: The method modifies the atlas label volume in-place.
compute_surface
anatomy.ClassifierAtlas.compute_surface()Compute the convex hull of the surface of the brain.
All voids below the surface are re-assigned to void_fluid new region.
Returns: None: The method modifies the atlas surface in-place.