[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Probably a simple question, but I'm only a beginner with this IDL stuff :)




David Fanning wrote:
> 
> 
> Whether the (0,0) pixel is in the lower-left corner
> of the window, or the upper-left corner is a matter
> of preference. The convention you choose to use is
> set by the !Order system variable, which by default
> is set to 0. To flip your image right side up, either
> set !Order=1 or set the ORDER keyword to 1 on the
> image display command:
> 
>    IDL> TV, image, Order=1
> 
> Cheers,
> 
> David

Here is yet another solution to your problem which may (or may not) be
better suited for your specific situation.  Instead of flipping the
image when issuing the TV command, you can flip the 3-D (or any-D) array
using IDL's
REVERSE function.

For example, assuming Image is a 3-D array interleaved by bit (i.e.
Image[RGB,Rows,Columns]) then the following statement will flip the
rows:

Image = Reverse(Image,2)

The second argument (i.e. 2 in the above example) tells Reverse which
index to reverse.  The others remain unchanged.

Enjoy,
Jason Meyers
PhD Student, Center for Imaging Science
Rochester Institute of Technology
jpm7934@rit.edu