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
Interval functionality for various Transform Ops #515
Conversation
@@ -235,6 +238,10 @@ private int pseudoRandom() { | |||
} | |||
assertFalse("More elements than expected", a.hasNext()); | |||
} | |||
|
|||
public static <T> RandomAccessible<T> deinterval(RandomAccessibleInterval<T> input){ | |||
return Views.extendBorder(input); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at where this method is used, replacing the original casts with calls to it seems legit. In general, however, this is not the case: with L243 you are replacing an already existing OutOfBoundsFactory
of input with an OutOfBoundsBorderFactory
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stelfrich How would you suggest it be changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ctrueden No changes, since it seems to be the only alternative to replacing the casts.
29baac0
to
2ff87f2
Compare
public void testDefaultRotate() { | ||
final Img<DoubleType> img = new ArrayImgFactory<DoubleType>().create(new int[] { 20, 10 }, new DoubleType()); | ||
|
||
final MixedTransformView<DoubleType> il2 = Views.rotate((RandomAccessible<DoubleType>) img, 1, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also use deinterval
? (applies to other tests as well...)
Removes the intervals on a RandomAccessibleInterval
This was removed since it was never matched and it was redundant.
This branch solves issue #486 by adding Interval functionality for the Rotate and Hyperslice ops. The branch also adds Interval functionality for the Permute, InvertAxis, Subsample and Translate ops.
This branch also fixes a Transform Namespace bug. Previously, the Transform Namespace was not being tested correctly because it was looking for ops in the "View" namespace, which does not exist.
Finally this branch removes the DefaultScaleView and renames WrappedScaleView as the new DefaultScaleView. This was done due to the redundancy between the two ops and due to the fact that DefaultScaleView would never be called.
Closes #486.