I have large light sheet datasets that need to be sheared or deskewed before analysis (the stack was collected with the sample/sheet motion not orthogonal to the XY plane). I’ve been using an ImageJ script or TransformJ affine to perform the deskewing; they work but execution speed isn’t as fast as I’d like. After noticing that the IJ2 ops has a shear transform built in I spent most of today trying to create a small script using it in hopes that it might be faster (or made faster in future). Also it seems there is the possibility of displaying a deskewed version of the dataset without actually resaving which would be nice. But some newbie mistake(s) remain despite my best efforts with the documentation and forum posts.
There are at least 2 things that I’m not sure about (1) how to apply the transform and (2) how to save the result. I see things about RandomAccessibleInterval and the idea of a “burnIn” op in the forum but it’s all going over my head.
Can anybody point me in the right direction? Links to further reading much appreciated. Perhaps more importantly, does this even seem like a good strategy to deskew large datasets?
Here is the simple Groovy script I’m using for testing.
# @ImageJ ij image = ij.io().open("http://imagej.net/images/fluoview-multi.tif"); // convenient example stack sheared = ij.op().run("shearView", image, 2, 0); // shear the data, not sure which axis is which nor a good way to find out but this is my best guess guess ij.ui().show(sheared); // I'm not sure how to make a concrete copy of the view that can be saved by itself
I get a warning in the console and log:
Ignoring unsupported output: result [net.imglib2.view.TransformView] and then nothing appears. I can show the original image just fine. I’m using FIJI on Win10 with Java8 and ImageJ 1.51t.
Thanks for your help!