here is a piece of code to add ROIs into Omero DB from a python script (server side)
I was wondering if it is possible to increase the fontSize of the rectangle label
(is there an example that uses fontSize or something ?)
moreover, since this annotation is placed inside a big-image, I was wondering if there is a way to set the fontsize independant of the zoom level in the client (the default size is way to small when dealing with whole slide imaging...)?
Thanks !
Olivier
- Code: Select all
# create a rectangle shape and add to ROI
rect = omero.model.RectI()
rect.x = rdouble(x)
rect.y = rdouble(y)
rect.width = rdouble(width)
rect.height = rdouble(height)
rect.theZ = rint(theZ)
rect.theT = rint(theT)
rect.textValue = rstring(str(core_id))
rect.strokeColor = rint(0xff0000)
roi.addShape(rect)
[edited]
the following lines seems to do the job
- Code: Select all
fontSize = LengthI()
fontSize.setValue(1000)
fontSize.setUnit(UnitsLength.POINT)
rect.setFontSize(fontSize)
However, the Java client does not appreciate these ROIs (Cannot display the ROI)...
maybe a version issue here ?