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

Get span of RectangleShape #5

Open
Squareys opened this issue Jul 30, 2015 · 3 comments
Open

Get span of RectangleShape #5

Squareys opened this issue Jul 30, 2015 · 3 comments

Comments

@Squareys
Copy link
Contributor

Hi @tpietzsch !

I am currently working on some neighborhood operations code, especially for imagej-ops. I need to access the span of an existing RectangleShape, but neither Shape nor RectangleShape have a simple way to access it.

I guess you can probably get the span over the bounding box of the neighborhood, but that does not seem very nice.

Ideas:
Common for all shapes is a bounding box. What would you thing of a method to retrieve this bounding box/interval for example?
Another idea could be to have every Shape subclass provide getters for their parameters. Not all shapes have a span, obviously.

If you tell me, how you would want a solution to this to look, I could implement it.

Greeting,
Squareys (Jonathan)

@tpietzsch
Copy link
Member

@Squareys I think both would be good: for every Shape to be able to provide a bounding box interval and adding subclass-specific methods to e.g. RectangleShape.

Regarding bounding box interval: Neighborhood already has a public Interval getStructuringElementBoundingBox() method. Because Shape does not have fixed dimensionality it would have to be public Interval getStructuringElementBoundingBox(int numDimensions) for Shape.

It would be cool if you could work on this!

@tpietzsch
Copy link
Member

Let's leave this issue open until the generic bounding box interval is implemented

@stelfrich
Copy link
Contributor

@tpietzsch I have implemented the bounding box for Shapes, see #27.

From your last comment it is not entirely clear, if you were aiming for something even more general like a BoundingBox interface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants