rockverse.voxel_image.VoxelImage.check_mask_and_segmentation#
- VoxelImage.check_mask_and_segmentation(*, mask=None, segmentation=None)[source]#
Validate mask and segmentation compatibility.
This method checks the validity of the provided mask, segmentation, and phases to ensure they are compatible with the voxel image.
- Parameters:
mask (VoxelImage, optional) – A mask voxel image. If provided, must be a voxel image of boolean dtype with the same shape, voxel length, voxel origin, and voxel unit.
segmentation (VoxelImage, optional) – A segmentation voxel image. If provided, must be a voxel image of boolean or unsigned integer dtype with the same shape, voxel length, voxel origin, and voxel unit.
- Raises:
ValueError – If any of the provided parameters are invalid or incompatible with the current voxel image.