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

Home » Public Forums » archive » Plotting results from z-buffer are diffrenet than xwindow.
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: Plotting results from z-buffer are diffrenet than xwindow. [message #89023 is a reply to message #89022] Wed, 16 July 2014 05:25 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
jlpippitt@comcast.net writes:

> Here is the code for the two plotting procedures. The resulting plots are different.
>
> xwindow plotting procedure:
> radar=rsl_anyformat_to_radar('/gvs2/gpmgv_data/gpmgv/KARX/1C UF/2014/0708/KARX_2014_0708_193306.uf.gz')
> rsl_plotsweep_from_radar,radar,/bgw,window=600,f='CZ',/new,m axrange=200,SWEEP_INDEX=0
>
> zbuff plotting procedure:
> radar=rsl_anyformat_to_radar('/gvs2/gpmgv_data/gpmgv/KARX/1C UF/2014/0708/KARX_2014_0708_193306.uf.gz')
> thisDevice = !D.Name
> Set_Plot, 'Z', /COPY
> Device,Set_Resolution=[600,600],Set_Pixel_Depth=24,Decompose d=1,Z_Buffer=0
> Erase
> rsl_plotsweep_from_radar,radar,bgw,window=600,f='DZ',new,max range=200,SWEEP_INDEX=0
> snapshot = TVRD()
> TVLCT, r, g, b, /Get
> Device, Z_Buffer=1
> Set_Plot, thisDevice
> image24 = BytArr(3, 600, 600)
> image24[0,*,*] = r[snapshot]
> image24[1,*,*] = g[snapshot]
> image24[2,*,*] = b[snapshot]
> write_png,'test.png',image24,r,g,b

Well, I don't see anything obviously wrong with the code, although I
would have certainly replaced all of this:

> snapshot = TVRD()
> TVLCT, r, g, b, /Get
> Device, Z_Buffer=1
> Set_Plot, thisDevice
> image24 = BytArr(3, 600, 600)
> image24[0,*,*] = r[snapshot]
> image24[1,*,*] = g[snapshot]
> image24[2,*,*] = b[snapshot]
> write_png,'test.png',image24,r,g,b

with this:

void = cgSnapshot(File='test.png', /NoDialog)
Set_Plot, thisDevice

Or, at the very least, with this:

image24 = TVRD(True=1)
write_png,'test.png',image24,r,g,b
Set_Plot, thisDevice

Do you find anything different if you leave the Device, Z_Buffer=1
command out of the sequence?

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: the problem of symbol Function
Next Topic: How to disable tick labels on right and top when using cgMap?

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

Current Time: Thu Oct 09 06:03:23 PDT 2025

Total time taken to generate the page: 0.00681 seconds