Skip to content

Commit

Permalink
Channel coeff can be Integer or Double
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikl committed Oct 29, 2024
1 parent 238cbea commit f127eef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/loci/formats/in/ZarrReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* #%L
* Implementation of Bio-Formats readers for the next-generation file formats
* %%
* Copyright (C) 2020 - 2022 Open Microscopy Environment
* Copyright (C) 2020 - 2024 Open Microscopy Environment
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -930,7 +930,9 @@ private void parseOmeroMetadata(String root, Map<String, Object> attr) throws IO
for (int i = 0; i < channels.size(); i++) {
Map<String, Object> channel = (Map<String, Object>) channels.get(i);
Boolean channelActive = (Boolean) channel.get("active");
Double channelCoefficient = (Double) channel.get("coefficient");
Double channelCoefficient = channel.get("coefficient") instanceof Double ?
((Double) channel.get("coefficient")) :
((Integer) channel.get("coefficient")).doubleValue();
String channelColor = (String) channel.get("color");
String channelFamily = (String) channel.get("family");
Boolean channelInverted = (Boolean) channel.get("inverted");
Expand Down

0 comments on commit f127eef

Please sign in to comment.