File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,9 @@ class OmeroChannel(BaseModel):
5959 wavelength_id: Unique ID for the channel wavelength, e.g. `A01_C01`.
6060 index: Do not change. For internal use only.
6161 label: Name of the channel.
62- window: Optional `Window` object to set default display settings for
63- napari.
62+ window: Optional `Window` object to set default display settings. If
63+ unset, it will be set to the full bit range of the image
64+ (e.g. 0-65535 for 16 bit images).
6465 color: Optional hex colormap to display the channel in napari (it
6566 must be of length 6, e.g. `00FFFF`).
6667 active: Should this channel be shown in the viewer?
@@ -370,6 +371,15 @@ def define_omero_channels(
370371 if channel .window :
371372 channel .window .min = 0
372373 channel .window .max = 2 ** bit_depth - 1
374+ else :
375+ # If no channel.window is set, create a new one with full bitrange
376+ # min & max
377+ channel .window = Window (
378+ min = 0 ,
379+ max = 2 ** bit_depth - 1 ,
380+ start = 0 ,
381+ end = 2 ** bit_depth - 1 ,
382+ )
373383
374384 # Check that channel labels are unique for this image
375385 labels = [c .label for c in new_channels ]
You can’t perform that action at this time.
0 commit comments