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?
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 doesrequest.channel_indices = visible_channels_(slide_reader.cpp:178,slide_image.cpp:59), there's no way to read different optical paths/channels from a singleFastSlidehandle in a thread-safe way — two threads selecting different channels race onvisible_channels_. The only thread-safe workarounds are to block optical path changes while reading or opening a separateFastSlideobject 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_regioncall and the other not?