Task #12936 (closed)
Bug: Insight shape fontSize and strokeWidth
Reported by: | wmoore | Owned by: | wmoore |
---|---|---|---|
Priority: | critical | Milestone: | OMERO-5.1.4 |
Component: | Insight | Version: | n.a. |
Keywords: | n.a. | Cc: | dlindner, jamoore |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
Bugs reported in https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=7834
If I create a Shape that has font size set like this
fontSize = omero.model.LengthI(50, UnitsLength.PIXEL) rect.fontSize = fontSize
then Insight fails to show ALL the ROIs on an image and Insight log says
2015-06-18 12:28:42,738 ERROR [ o.o.s.a.m.v.MeasurementViewerComponent] (entQueue-0) Cannot convert server ROI into UI objects:java.lang.NullPointerException 2015-06-18 12:28:48,973 ERROR [ o.o.s.a.m.view.MeasurementViewerUI] (entQueue-0) Problem while handling ROI No ROIShape on coord T: 0 Z: 0
If I set strokeWidth like this:
strokeWidth = omero.model.LengthI(5, UnitsLength.PIXEL) rect.strokeWidth = strokeWidth
this is ignored in the display of shapes on the image in Insight, although it is shown in the "Inspector" tab (see screenshot).
Also attached is the script for creating tested shapes and screenshot of how they look in web.
Attachments (3)
Change History (17)
Changed 9 years ago by wmoore
comment:1 Changed 9 years ago by jburel
The font size should be in point not pixels.
comment:2 Changed 9 years ago by jburel
The font size should be in point not pixels.
cf forum post
insight is also converting to point units
comment:3 Changed 9 years ago by wmoore
Units of POINT or PIXEL are both broken, but should both work the same.
comment:4 Changed 9 years ago by jburel
if the shapes are created from insight, the values seem to be correctly read and displayed.
comment:5 Changed 9 years ago by wmoore
That's great, but doesn't help with the display of shapes from scripts.
comment:6 Changed 9 years ago by jburel
I know. one step at a time!!!
comment:7 Changed 9 years ago by wmoore
Examples on trout (user-3).
StrokeWidth in PIXELS: https://trout.openmicroscopy.org/merge/webclient/img_detail/9461/ FontSize in PIXELS https://trout.openmicroscopy.org/merge/webclient/img_detail/9460/ FontSize in POINTS https://trout.openmicroscopy.org/merge/webclient/img_detail/9463/
comment:8 Changed 9 years ago by jburel
- Cc dlindner jamoore added
- Status changed from new to accepted
I have improved the error handling in insight and pojo so the shapes with fontsize are visible.
A NPE is thrown during the conversion from Pixels to Point so we will to have a look at it.
Remaining issue is the stroke width
Cc Josh and Dominik who have both been working on the conversion
comment:9 Changed 9 years ago by jburel
- Owner changed from jburel to wmoore
All the problems in insight/pojo have now been fixed. see https://github.com/openmicroscopy/openmicroscopy/pull/3890
The fact that the stroke width (same for fill color) was displayed in the web was due to the fact that the alpha component of the color is not handled in web.
Passing ticket to Will to fix that issue.
comment:10 Changed 9 years ago by jburel
see also #12394
comment:11 Changed 9 years ago by jburel
Will, did you have a chance to look at that one?
comment:12 Changed 9 years ago by wmoore
I think alpha is handled in web unless it is zero. This is the same logic you have in Insight now, right?
So I don't think there's anything else that needs doing.
comment:13 Changed 9 years ago by wmoore
- Resolution set to fixed
- Status changed from accepted to closed
comment:14 Changed 9 years ago by jamoore
- Milestone changed from 5.1.4 to OMERO-5.1.4
Splitting 5.1.4 due to milestone decoupling
strokeWidth not shown on image