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

Home » Public Forums » archive » 3D VOLUME VISUALIZATION
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: 3D VOLUME VISUALIZATION [message #42099 is a reply to message #34070] Mon, 03 January 2005 13:55 Go to previous messageGo to previous message
idle is currently offline  idle
Messages: 4
Registered: January 2005
Junior Member
Antonio Santiago wrote:
> idle wrote:
>> Is there any way to make the volume transparent so one can see
through
>> the volume instead only the front plane? Thanks!
>>
>
>
> I supossing you are talking about IDLgrVolume. The RGB_TABLE0 is the
> color table (256x3 array) for your DATA0 data and OPACITY_TABLE0 is
the
> opacity (256 array) for every element of the RGB_TABLE0 color table.
> Then, for every color you can asign an opacity ("alpha channel").
>
> Bye.

Thanks. I met another problem as I first deal with 3D visulation. I can
show the data on the screen, but when I use OBJ_NEW('IDLgrClipboard')
to try to save it to a file as postscript, the eps file is just a dark
images. By the way, how to save the image as a jpeg file?

following is part of the code to draw and save the image.
;----------------------------

loadct,13
tvlct, r, g, b,/get
rgb=bytarr(256,3)
rgb(*,0)=r & rgb(*,1)=g & rgb(*,2)=b

myvolume = OBJ_NEW('IDLgrVolume', da)
cc=[-0.5,1.0/64.0]
myvolume->SetProperty,XCOORD_CONV=cc,YCOORD_CONV=cc,ZCOORD_CONV=cc
mywindow = OBJ_NEW('IDLgrWindow',DIMENSIONS=[400,400])
;mywindow = OBJ_NEW('IDLgrClipboard')

myview = OBJ_NEW('IDLgrView',VIEWPLANE_RECT=[-1,-1,2,2], $
ZCLIP=[2.0,-2.0],color=[50,50,50])
mymodel = OBJ_NEW('IDLgrModel')
myview->Add,mymodel
mymodel->Add,myvolume
mymodel->rotate,[1,1,1],20
opac = BYTARR(256)
opac[0:127] = BINDGEN(128)/8
myvolume->SetProperty,OPACITY_TABLE0=opac
myvolume->SetProperty,RGB_TABLE0=rgb
mywindow->Draw,myview
;mywindow->Draw,myview,VECTOR=1,POSTS=1,FILE='rgb.eps'
;mywindow->Draw,myview,VECTOR=0,POSTS=0,FILE='a.bmp'
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: xmargin and ymargin keywords ignored in cgplot
Next Topic: plotting missing values

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

Current Time: Wed Oct 08 18:04:40 PDT 2025

Total time taken to generate the page: 0.00449 seconds