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

Home » Public Forums » archive » Re: REBIN Question
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: REBIN Question [message #11090] Sat, 14 March 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Patrick Ford, MD (pford@bcm.tmc.edu) writes:

> Either I have uncovered a bug in REBIN in the Mac version of IDL V 5.0.3
> or I don�t fully understand how REBIN works. I want to take a 2-D byte
> array at_target that is 64X64 in size and make it into a 1-D byte array
> with the same number of elements and vis versa. The results are not what
> I am expecting so I used the code below to test it. The displayed images
> are not even close to each other.
>
> Would someone be kind enough to explain why and how I can do this other
> than using the code below(test2) the offending section.

I think you are confusing REBIN with the similar sounding,
but different, REFORM. Making the switch makes your test
program work:

pro test
window,5,xsize= 128, ysize = 128
window,6,xsize= 128, ysize = 128

at_target= bytarr(64,64)
at_target(0:63,0:63) = 255B
at_target(10:20,10:20) = 200B;

wset,5
tvscl, at_target
wset,6
tvscl, Reform(Reform(at_target, 64*64),64,64)
end

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Memory Mapped files For IDL (UNIX)
Next Topic: Re: 16-bit tiffs

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

Current Time: Wed Oct 08 19:29:17 PDT 2025

Total time taken to generate the page: 0.00455 seconds