Login  Register

stack rotate

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

stack rotate

Tony Shepherd
Hi,
Is there a smart way to rotate a whole stack through 90 degrees (i.e.
transpose, so no interpolation necessary)

I have found the method rotateRight() for ImageProcessor objects, so I could
go through slice-by-slice and make a new ip object from each slice to build
up a new stack, but I'd rather not make a completely separate object in this
way (I'd have to somehow kill the stack that is on screen and display the
new one in its place)

Is there a better way?

T
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: stack rotate

Wayne Rasband
> Hi,
> Is there a smart way to rotate a whole stack through 90 degrees
> (i.e. transpose, so no interpolation necessary)
>
> I have found the method rotateRight() for ImageProcessor objects, so
> I could go through slice-by-slice and make a new ip object from each
> slice to build up a new stack, but I'd rather not make a completely
> separate object in this way (I'd have to somehow kill the stack that
> is on screen and display the new one in its place)
>
> Is there a better way?

Use the Image>Rotate>Rotate 90 Degrees Right or Image>Rotate>Rotate 90
Degrees Left commands. In a plugin, use

     IJ.run("Rotate 90 Degrees Right");

or

     IJ.run("Rotate 90 Degrees Left");

-wayne