Skip to content

[FR] Add a per-call channels argument to read_region #51

Description

@erikogabrielsson

Hi and thanks for your work on this library.

In the python api, channel selection is only available via set_visible_channels(), which mutates per-reader state (visible_channels_). Since every read does request.channel_indices = visible_channels_ (slide_reader.cpp:178, slide_image.cpp:59), there's no way to read different optical paths/channels from a single FastSlide handle in a thread-safe way — two threads selecting different channels race on visible_channels_. The only thread-safe workarounds are to block optical path changes while reading or opening a separate FastSlide object per channel to read.

Is there a reason for channel selection to be different the focal plane selection? I.e. why is one in the read_region call and the other not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions