imagej-ops icon indicating copy to clipboard operation
imagej-ops copied to clipboard

Real transform

Open bnorthan opened this issue 7 years ago • 8 comments

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);

image

image

bnorthan avatar Dec 12 '17 13:12 bnorthan

@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 avatar Jun 05 '18 12:06 awalter17

@awalter17 I just did all the changes you requested. Please let me know if there is anything else. Thanks.

bnorthan avatar Jun 08 '18 13:06 bnorthan

@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.

imagejan avatar Dec 16 '19 12:12 imagejan

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.

bnorthan avatar Dec 16 '19 12:12 bnorthan

@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 avatar Jan 23 '20 21:01 ctrueden

@ctrueden I only have time to quickly glance over this, but we can probably add all this functionality with a couple of OpFields. I will add it to the TODO list

gselzer avatar Jan 23 '20 22:01 gselzer

@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 avatar Jun 24 '21 14:06 imagejan

@imagejan https://github.com/scijava/incubator/pull/36 😉

gselzer avatar Jun 24 '21 17:06 gselzer