8000 Proposal: deprecate `multichannel=` in favour of `channel_axis=` · Issue #4294 · scikit-image/scikit-image · GitHub
[go: up one dir, main page]

Skip to content
Proposal: deprecate multichannel= in favour of channel_axis= #4294
@jni

Description

@jni

This might need a SKIP. =P But won't if we get unanimous agreement!

The name multichannel is a bit clunky. Worse than that, it does not quite provide sufficient information: we hardcode the channel axis as -1, which might actually be incorrect. Allowing for arbitrary channel axes allows (1) giving the data in acquisition axis order, which often does not have the channels as the last axis, and (2) allowing channels to be the leading axis, which in many cases is more efficient, as the processing happens independently on each channel (e.g. gaussian filtering), and this is more cache friendly if each channel is contiguous.

Over at napari, we've settled on channel_axis=None being equivalent to multichannel=False, and channel_axis=<int> to point to an axis to interpret as channel rather than spatial data. I quite like it, and seeing an issue like #4293, where we might want to either specify no channels or a different channel axis makes me think that we can refine scikit-image to use this also.

Looking forward to hearing your thoughts!

Metadata

Metadata

Assignees

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0