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 #23322 is a reply to message #23317] Tue, 16 January 2001 20:19 Go to previous messageGo to previous message
Mark Chan is currently offline  Mark Chan
Messages: 24
Registered: November 2000
Junior Member
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.

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).

Thanks,
Mark Chan

"Craig Markwardt" <craigmnet@cow.physics.wisc.edu> wrote in message
news:on8zoct3qv.fsf@cow.physics.wisc.edu...
>
> "Mark Chan" <chanm@cadvision.com> writes:
>
>> I am new to bytarr operation.
>>
>> I have 3 separate color images in the following format:
>>
>> bytarr(3,40,15500)=a
>> bytarr(3,40,15500)=b
>> bytarr(3,40,4000)=c
>>
>> Each representing a portion of a large image. They were read from 3
separate
>> files.
>>
>> What is the easiest way to combine these 3 files into one file and
output it
>> to a single file for later operation.
>
> I am assuming you want to concatenate the three arrays into a
> 3x40x35000 array. If that's the case then the following code shold
> show you the way, here using three arrays BB1, BB2 and BB3 as a
> example
>
> IDL> bb1 = bytarr(3,40,100)
> IDL> bb2 = bytarr(3,40,200)
> IDL> bb3 = bytarr(3,40,400)
>
> IDL> help, [[[bb1]],[[bb2]],[[bb3]]]
> <Expression> BYTE = Array[3, 40, 700]
>
> Voila. To be honest with you, I never understand how many nested []'s
> I need in order to make it work. I just go for trial and error until
> it does.
>
> 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: Sun Oct 12 12:15:30 PDT 2025

Total time taken to generate the page: 1.51696 seconds