imagej-ops
imagej-ops copied to clipboard
Real transform
This commit applies a realtransform to an input image.
Round 2
The Op is now called DefaultTransformView
and wraps Views.transformReal
. And the transforms are more "intuitive" (trans.scale(0.5) makes the image smaller. Use case is below
AffineTransform2D transform = new AffineTransform2D();
transform.translate(-image.dimension(0)/2,-image.dimension(0)/2);
transform.rotate(1);
transform.scale(0.5);
transform.translate(image.dimension(0)/2,image.dimension(0)/2);
RandomAccessibleInterval<UnsignedByteType> actualOutput=ops.transform().realTransform(image, transform);
@bnorthan I've rebased this branch over master, updated the license header, and fixed a few whitespace issues. I've also noted a few minor changes that need to be fixed, but after that this should be good to merge.
Thank you for all your work on this! 😺
@awalter17 I just did all the changes you requested. Please let me know if there is anything else. Thanks.
@ctrueden @bnorthan are there any plans to merge this one soon? Or is it on hold until scijava-ops
are out?
I'm asking because I'd like to use some of this functionality, but I can also fall back to using ImgLib2 directly.
Hi @imagejan
It's been a while... I made some changes to this over a year ago but it looks like it slipped through the cracks after that. I'm not sure what the best approach is for changes to imagej-ops/scijava-ops right now. I've only made a couple of small changes in the last few months, and just flagged @gselzer so he can make the same change in scijava-ops.
@gselzer How much effort do you think it would be to port this to scijava-ops soon? I'd rather not add more new features to imagej-ops at this juncture—but I really want this function in the new ops. 😄
@ctrueden I only have time to quickly glance over this, but we can probably add all this functionality with a couple of OpField
s. I will add it to the TODO list
@gselzer @ctrueden is anything like this usable in the new scijava-ops
(https://github.com/scijava/incubator) yet?
It would be a good argument for me to get started exploring your recent work of overhauling the ops framework 🙂
@imagejan https://github.com/scijava/incubator/pull/36 😉