Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model: "stroke" prefix on Shape properties; lineCap property name #17

Closed
mtbc opened this issue Feb 11, 2016 · 8 comments
Closed

model: "stroke" prefix on Shape properties; lineCap property name #17

mtbc opened this issue Feb 11, 2016 · 8 comments
Labels

Comments

@mtbc
Copy link
Member

mtbc commented Feb 11, 2016

On http://www.openmicroscopy.org/site/support/omero5.2/developers/Model/EveryObject.html#shape in OMERO Shape has a few stroke-related properties:

  • strokeColor
  • strokeDashArray
  • strokeDashOffset
  • strokeLineCap
  • strokeLineJoin
  • strokeMiterLimit
  • strokeWidth

The OME-XML schema at http://www.openmicroscopy.org/Schemas/Documentation/Generated/OME-2015-01/ROI_xsd.html#Shape has:

  • StrokeColor
  • StrokeDashArray
  • StrokeWidth
  • LineCap

For OMERO 5.3 to harmonize with OME-XML we've thus already merged commits that drop:

  • strokeDashOffset
  • strokeLineJoin
  • strokeMiterLimit

There remains a question about what to do about strokeLineCap seeing as OME-XML names it only LineCap:

  1. Should OMERO use lineCap to match OME-XML?
  2. Should OME-XML use StrokeLineCap to fit the other Stroke- properties?
  3. Should the "stroke-" prefix be dropped in either or both for all the properties? (What about color though?)

For that last list item @rleigh-dundee makes an interesting point in https://trello.com/c/9ZsIFHcJ/38-discrepancies:

Regarding StrokeLineCap, are Stroke and Line not used interchangeably? So would it be better to standardise upon Line or Stroke entirely rather than using both? Or is this a special case?

@mtbc mtbc changed the title "stroke" prefix on Shape properties; lineCap property name model: "stroke" prefix on Shape properties; lineCap property name Feb 11, 2016
@mtbc
Copy link
Member Author

mtbc commented Feb 11, 2016

Frankly for expediency I suggest just dropping linecap from both, as being fiddly presentation detail our model doesn't need, and to brush the more general prefixing issue under the rug for now.

@ghost
Copy link

ghost commented Feb 11, 2016

Mentioned while talking with Mark just now: one consideration here is the difference in usage between measurement and annotation.

If I'm using a region to measure a distance, I expect that distance to be displayed accurately. So if I have a line which is 50µm long, I expect it to be 50, not 54 with 2µm linecaps at each end.

If I'm using it to draw something purely for presentation, e.g. a hand-drawn outline around a feature, then I might start to consider aesthetics; but even here the use of linecaps would be limited. We have included features like this historically because it mapped onto the jhotdraw svg model; but they don't really have a place in the domain we're modelling here. We might, as part of future work, wish to separate regions by their purpose, e.g. measurement and annotations, which can potentially influence the renderer by choosing between accuracy (for measurement) and presentation (for annotations).

Removing these SVG-specific features also aids future work to have multiple implementations of the ROI rendering, i.e. OMERO, OMERO.web, OpenGL, WebGL, etc.

@sbesson sbesson added the model label Feb 24, 2016
@will-moore
Copy link
Member

I think you can have a lineCap without affecting the accurate length of a line.
In OMERO.figure the lineCap (I presume this means Arrow head) fits within the end points of the line (I think ImageJ does the same):

screen shot 2016-02-24 at 09 42 14

I think we do need lineCap, since we otherwise wouldn't be able to store arrows at-all, right?

@mtbc
Copy link
Member Author

mtbc commented Feb 24, 2016

No, I thought arrow heads are markerStart/markerEnd, #18.

@mtbc
Copy link
Member Author

mtbc commented Feb 24, 2016

I'd interpreted linecap to be about something like http://atrey.karlin.mff.cuni.cz/~milanek/PostScript/Reference/PSL2s.html#setlinecap.

@will-moore
Copy link
Member

Ah, OK - sorry. I think we can just get rid of lineCap then. Seems unnecessary for us to implement the display of this in all clients, for no real reason. Purely cosmetic.

@mtbc
Copy link
Member Author

mtbc commented Feb 26, 2016

The current plan is to just drop LineCap from OME-XML and strokeLineCap from OMERO.

mtbc added a commit to mtbc/bioformats that referenced this issue Mar 16, 2016
mtbc added a commit to mtbc/openmicroscopy that referenced this issue Mar 17, 2016
@mtbc
Copy link
Member Author

mtbc commented Mar 17, 2016

@mtbc mtbc closed this as completed Mar 17, 2016
rgozim pushed a commit to rgozim/openmicroscopy that referenced this issue Oct 8, 2018
joshmoore pushed a commit to ome/omero-model that referenced this issue Dec 11, 2018
joshmoore pushed a commit to ome/omero-model that referenced this issue Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants