Open gselzer opened 6 years ago
I am OK with the output differing from past implementations, so that we achieve a configurable angle.
Please write a test, and then we can merge it.
@ctrueden I found test commit that was for some reason not pushed. The test passes and is sound, however it introduces a test-scope dependency on scijava-io-http that I am not sure we want. It also forces the download of abe.tif, which seems bad to me. However it does have a method downloadOnce
that seems valuable; maybe it should go in DownloadService
. Let me know what you think of this
This Op provides an
Op
version of the ImageJ Core Plugin created by Barry Dezonia.Below is a demo of the new
Shadows
Op (middle) run on this image (left), taken from imagej.net, alongside the output of the same image run through the Plugin (right).Points of Discussion:
Op
generates its Shadows kernel through the used of an angleParameter
, allowing for a singleOp
as opposed to the eight differentPlugin
s that already exist. The use of an angle parameter also allows the user to generate shadows at any desired angle instead of being limited to the eight predefined angles. The only downside to this is that in order to keep the algorithm simple theOp
uses sine and cosine values to generate the kernel which differs from the linear kernel of the olderPlugin
s, resulting in differing outputs (though in most cases not visually distinguishable). Is it okay that theOp
differ from thePlugin
it adapts in order to increase its flexibility?TODO:
Op
. The above point should be decided on before a test is written. If we decide that the difference in output should be allowed then a simple Regression test can be created, otherwise we could test theOp
based on the output of thePlugin
if we deem it necessary to make the output exactly the same.