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

Home » Public Forums » archive » Re: Merging Bytarr
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: Merging Bytarr [message #23317 is a reply to message #23311] Wed, 17 January 2001 07:03 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Hi Mark--

"Mark Chan" <chanm@cadvision.com> writes:
> Thanks Craig.
>
> I used this clumsy way:
> d=bytarr(3,40,700)
> d(0,0,0)=a & d(0,0,200)=b & d(0,0,300)=c
>
> You way is better.

Actually, your way is *faster*, and with the use of TEMPORARY can
potentially use less memory. However the disadvantage is that you
have to know ahead of time the dimensions of your array. I definitely
use above technique alot. The technique I suggested,
[[[a]],[[b]],[[c]]], is very elegant syntactically, and works with any
3x40xN arrays. Since you are a relative newcomer to the group
(right?), I went with simple over efficient.

> What throws me off in the first place was that the image, when shown on
> screen, was 40 wide and 100 high, the next one 200 high, and the last one
> 400 high. To be pasted into 40 wide x 700 wide. The sequence of the
> (3,40,etc) was not the same as my experience with other array indices (may
> be I am missing something).

I am assuming the "3" in 3x40xN are the three elements of an RGB
triple? In that case, you really have a 40xN image, where 40 will be
along the X axis and N will be along the Y axis. I *think* so at
least. So this seems to jive with what you were describing. You can
always use the TRANSPOSE function to flip X and Y.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: An IDL STRTOK??? Was: TextoIDL Broken and Gone?
Next Topic: axis and titles

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

Current Time: Mon Oct 13 09:10:13 PDT 2025

Total time taken to generate the page: 0.56319 seconds