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

Home » Public Forums » archive » Re: Image tranpose
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Image tranpose [message #16034] Thu, 01 July 1999 00:00
luthi is currently offline  luthi
Messages: 20
Registered: March 1999
Junior Member
> I'm looking for some help troubleshoooting some code. I have a 2-D
> array, an image, which I can display using TVSCL. This works fine
> on SGI (IDL 5.2). But, on Linux, the image is transposed. Anyone
> seen this before?

Hi

To me this sounds like a little-endian/big-endian problem. I guess you use
Linux on a Intel-processor which is little endian, opposite to SGI which is
big endian. If you read your data in binary form as integer or long, this
could be the clue to the problem. Then the you should either use a platform
independent data storage (XDR, HDF, netCDF) or you could swap the bytes with
the BYTEORDER procedure (check the documentation for the appropriate
keywords).

Probably this will help

Cheers

Martin


--
============================================================
Martin Luethi Tel. +41 1 632 40 92
Glaciology Section Fax. +41 1 632 11 92
VAW ETH Zuerich
CH-8092 Zuerich mail luthi@vaw.baum.ethz.ch
Switzerland
============================================================
Re: Image tranpose [message #16047 is a reply to message #16034] Wed, 30 June 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Bernard Puc (bpuc@va.aetc.com) writes:

> That was my initial guess too except that the image is both upside
> down and reversed left to right. On further inspection, it turns
> out not to be IDL related but an external C function which is the
> culprit. The image is interpolated from non-uniform data in this
> function. Now I have to see why that function behaves differently
> on different platforms.

Yes. It's not always easy to write code that works the same on
different platforms, as any software engineer at RSI would be
only too happy to tell you, I'm sure. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Image tranpose [message #16048 is a reply to message #16047] Wed, 30 June 1999 00:00 Go to previous message
Bernard Puc is currently offline  Bernard Puc
Messages: 65
Registered: January 1998
Member
David Fanning wrote:
>
> Bernard Puc (bpuc@va.aetc.com) writes:
>
>> I'm looking for some help troubleshoooting some code. I have a 2-D
>> array, an image, which I can display using TVSCL. This works fine
>> on SGI (IDL 5.2). But, on Linux, the image is transposed. Anyone
>> seen this before?
>
> I'm guessing that someone set !Order=1 in the startup file
> on one of your machines. :-)
>

That was my initial guess too except that the image is both upside
down and reversed left to right. On further inspection, it turns
out not to be IDL related but an external C function which is the
culprit. The image is interpolated from non-uniform data in this
function. Now I have to see why that function behaves differently
on different platforms.

--
Bernard Puc AETC, INC.
bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
(703) 413-0500 Arlington, VA 22202
Re: Image tranpose [message #16051 is a reply to message #16047] Wed, 30 June 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Bernard Puc (bpuc@va.aetc.com) writes:

> I'm looking for some help troubleshoooting some code. I have a 2-D
> array, an image, which I can display using TVSCL. This works fine
> on SGI (IDL 5.2). But, on Linux, the image is transposed. Anyone
> seen this before?

I'm guessing that someone set !Order=1 in the startup file
on one of your machines. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: singular value decompostion
Next Topic: Re: xwindow question

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

Current Time: Wed Oct 08 18:39:01 PDT 2025

Total time taken to generate the page: 0.00745 seconds