Re: Image tranpose [message #16034] |
Thu, 01 July 1999 00:00 |
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  |
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  |
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  |
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
|
|
|