Closed tischi closed 5 years ago
I just saw that this was raised already here: https://github.com/imglib/imglib2-algorithm/issues/10
Hi @tischi
Yes you are right, but this is how we started at the beginning.
If you look around for other implementations of Shape
you will see that there are various classes that vary with their capabilities. The decision to rename this belong to its author, @tpietzsch
Hi @tinevez
I don't think we'd need to change the name in this case. I feel adding more constructors would do the job. Just specifying one integer would be just one very specific rectangle
, namely a cube
. In this way one would be backwards compatible and still have the chance to specify an actual rectangle
. What do you think?
I don't completely agree. Name -> function.
So I would make a class for a Cube with skipCenter
flag.
And another class for general Rectangle.
Yes, that would be nicer!
In that case one could maybe add a HyperCube
neighborhood and add more constructors to the RectangleNeighborhood
. This looks to me like it would be backwards compatible.
@stelfrich @tinevez I was wondering why there only is a constructor with one single integer for the span: https://github.com/imglib/imglib2-algorithm/blob/master/src/main/java/net/imglib2/algorithm/neighborhood/RectangleShape.java#L67 To me, that would indicate that it is a
cube
rather than arectangle
. Could one add a constructor where one can specify different lengths of the span in all dimensions?