Shear 2D images stacks along third dimension

Tags: #<Tag:0x00007fd541e79b18> #<Tag:0x00007fd541e799d8>


Hello All,

A new user with 1st post here!

I am struggling and not even sure if it is possible to shear a 2D image stacks along third dimension!

I have a usual stack of 2D images representing a 3D volume (each image is in XY plane stacking along Z-axis ). Now I want to shear the whole representative volume by a certain angle along Z-axis and visualize it.

Initially I thought Affine transform should work nicely, so I followed following recipe with TransformJ (ImageScience) plugin:

Import the image stack
Image -> Stack -> 3D project (to have a visual 3D representation of starting volume)
Select image stack and Plugins -> TransformJ -> TransformJ Affine -> Create a matrix 1 0 0 0; 0 1 0 0; 0 d 1 0; 0 0 0 1 where d represents the shear along Z-axis which is linearly dependent on y axis.
Applying this Affine transform gives proper result for a stack of single image but while working with a stack of multiple images, I get a hyperstack where each of initial image slice gets split into multiple frames. I am finding it difficult to put this hyperstack together to give a seamless sheared view of the starting volume.

I would be happy to learn if I am making some mistake or there is another way of doing this.

Thank you.



Just figured it out myself!

The issue was my initial stack was imported as a time stack. All I had to do was change the properties and make it as z-stack and then same process as outlined above is giving me what I wanted!

Hoping I didn’t waste someone else’s time here :slight_smile: