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):
59
59
wavelength_id: Unique ID for the channel wavelength, e.g. `A01_C01`.
60
60
index: Do not change. For internal use only.
61
61
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).
64
65
color: Optional hex colormap to display the channel in napari (it
65
66
must be of length 6, e.g. `00FFFF`).
66
67
active: Should this channel be shown in the viewer?
@@ -370,6 +371,15 @@ def define_omero_channels(
370
371
if channel .window :
371
372
channel .window .min = 0
372
373
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
+ )
373
383
374
384
# Check that channel labels are unique for this image
375
385
labels = [c .label for c in new_channels ]
You can’t perform that action at this time.
0 commit comments