Code Monkey home page Code Monkey logo

Comments (3)

will-moore avatar will-moore commented on July 28, 2024 1

I'm afraid you'll need to handle each Shape separately.
Create a function, e.g. getBoundingBox(shape) and implement that for each type of Shape.
E.g. for PolyLine or Polygon, iterate through all the points and find min/max for X and Y.
See https://omero.readthedocs.io/en/v5.6.7/developers/Python.html#rois under "Retrieve ROIs linked to an Image"
For polygons and polyline parsing of the points string, see https://github.com/ome/omero-web/blob/ba072f151247df5b62768a0fbf37891675e2802d/omeroweb/webgateway/marshal.py#L390

from omero-scripts.

lguerard avatar lguerard commented on July 28, 2024

Thanks @will-moore for the pointers. Stupidly enough, I thought that it would be a simple getbbox like in Fiji. When I have time I'll look at implementing it !

In the meantime, I've also noticed that using the script on a 16bit image returns an 8bit image. Also the thumbnail looks weird and the image doesn't open, would you know why this would happen ?
image

from omero-scripts.

will-moore avatar will-moore commented on July 28, 2024

I'm not sure what you're seeing there but the script works for me on a 16-bit image so I'm not sure it's the data-type.
Can you test with a few different images and confirm whether you're seeing this issue on all 16-bit images but not on any others?

from omero-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.