Skip to content

Axes Validators

Source

Axes validation utilities.

check_axes_validity(axes)

Sanity check on axes.

The constraints on the axes are the following: - must be a combination of 'STCZYX' - must not contain duplicates - must contain at least 2 contiguous axes: X and Y

Axes do not need to be in the order 'STCZYX', as this depends on the user data.

Parameters:

Name Type Description Default
axes str

Axes to validate.

required

check_czi_axes_validity(axes)

Check if the provided axes string is valid for CZI files.

CZI axes is always in the "SC(Z/T)YX" format, where Z or T are optional, and S and C can be singleton dimensions, but must be provided.

Parameters:

Name Type Description Default
axes str

The axes string to validate.

required

Returns:

Type Description
bool

True if the axes string is valid, False otherwise.