validate_mesh_matches_image_extents#

brainglobe_atlasapi.atlas_generation.validate_atlases.validate_mesh_matches_image_extents(atlas: BrainGlobeAtlas)[source]#

Check if the mesh and the image extents are similar.

Validates that the spatial extents of the root mesh align with the extents of the non-zero voxels in the annotation image, considering the atlas resolution.

Parameters:

atlas (BrainGlobeAtlas) – The BrainGlobeAtlas object to validate.

Returns:

True if the mesh and image extents are sufficiently similar.

Return type:

bool

Raises:

AssertionError – If the extents differ by more than the allowed tolerance (default 10 times pixel size).