comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: ROTATE function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: ROTATE function [message #84335 is a reply to message #84333] Mon, 13 May 2013 08:26 Go to previous messageGo to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
> It's what happens when software is written years before 24-bit "color
> images" are even a twinkle in the author's eye. :-)

Ok, that makes sense. If you take the longer route using the multi-dimension capable transpose and reverse on a [3,x,y] colour image,

b=transpose(a,[0,2,1]) ;leave zeroth as is; swap 1st and 2nd dimensions
c=reverse(b,1) ;unflip on 1st dimension to arrive at rotation

you get some weird psychedelic result. Why? Because transpose understands dimensions numbered from zero, but reverse likes them numbered from 1!

So it should be c=reverse(b,2). Peculiar? But it works, and all is well.

greg
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: ROTATE function
Next Topic: colorbar() rotation/translation bugs

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:55:31 PDT 2025

Total time taken to generate the page: 0.24314 seconds