Closed jburel closed 3 years ago
Cross-linking to https://github.com/ome/omero-iviewer/pull/343#issuecomment-679938990 where the issue has been previously mentioned.
As per
only a subset of the length/time units are currently handled
The method mentioned above format_value_with_units
is not iviewer specific
figure for example will need something similar to handle time for timelapse figure
For testing, I used this script to convert all time units to DAY
for a test image:
import omero
from omero.gateway import BlitzGateway
conn = BlitzGateway('user', 'password', port=4064, host='localhost')
conn.connect()
image_id = 1269
updateService = conn.getUpdateService()
params = omero.sys.ParametersI()
params.addLong('pid', conn.getObject("Image", image_id).getPixelsId())
query = "from PlaneInfo as Info where pixels.id=:pid"
info_list = conn.getQueryService().findAllByQuery(
query, params, conn.SERVICE_OPTS)
for info in info_list:
if info.deltaT is not None:
info.deltaT.setUnit(omero.model.enums.UnitsTime.DAY)
updateService.saveObject(info)
image from idr0113 do not have time information The time is given in days so I used
time.setUnit(omero.model.enums.UnitsTime.DAY)
Unfortunately the units is not taken into account by the viewer and the time is indicated in secondsIn the screenshot below it should be 8 days not 8 seconds