spatialdata.models.set_channel_names

spatialdata.models.set_channel_names#

spatialdata.models.set_channel_names(element, channel_names)#

Set the channel names for a image SpatialElement in the SpatialData object.

Parameters:
  • element (DataArray | DataTree) – The image SpatialElement or parsed ImageModel.

  • channel_names (str | list[str]) – The channel names to be assigned to the c dimension of the image SpatialElement.

Return type:

DataArray | DataTree

Returns:

: The image SpatialElement or parsed ImageModel with the channel names set to the c dimension.