imagej / imagej/imagej-ops

Possible bug in AbstractFeatureTest

Open
#295 1 comment 0 reactions 1 assignee Assigned to @tibuch View on GitHub
Dominant language
Java
Stars
94
Forks
44
PR merge metrics
No merged PRs in 30d

Description

In AbstractFeatureTest, its method `getEllipsedBitImage` is supposed to generated an ellipsed bit image with specific dimension, radius, and OFFSET. However, the `offset` parameter is not used at all inside the method. I think [this line](https://github.com/imagej/imagej-ops/blob/master/src/test/java/net/imagej/ops/features/AbstractFeatureTest.java#L237) should be changed to `origin[i] = dim[i] / 2 + offset[i];`

This method is called to generate two different such images, the second one is the translated and rotated version of the first one. The only test class that uses those two ellipsed bit images is the [ZernikeFeatureTest](https://github.com/imagej/imagej-ops/blob/master/src/test/java/net/imagej/ops/features/zernike/ZernikeFeatureTest.java). Interestingly, it never reports this possible bug (not using `offset`), and when I try to fix it as I mentioned above, the both tests in ZernikeFeatureTest fail.

I am not sure whether this behavior is expected, or both the AbstractFeatureTest and the ZernikeFeatureTest have bug. @dietzc Any idea?

If this is actually a bug, could anyone first review this pull request https://github.com/imagej/imagej-ops/pull/294 ? Those are some modifications on AbstractFeatureTest.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.