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

Home » Public Forums » archive » Re: Black screen movie
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: Black screen movie [message #79580] Mon, 12 March 2012 03:39
Sofie Fehlmann is currently offline  Sofie Fehlmann
Messages: 5
Registered: November 2011
Junior Member
Thanks a lot for your advice, the simulation is now correctly running!

I think the problem was the use of 'Contour' instead of 'cgContour'. I
don't know why, but there seems to be a problem if I use the 'Contour'
command.

Anyway, I'm now happy with my result.
Re: Black screen movie [message #79592 is a reply to message #79580] Fri, 09 March 2012 07:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sofie Fehlmann writes:

> Yes, I would like to take a snapshot of the Contour plot and put it
> into a movie. However, it is not working, there is just a black
> screen. This is the main part of my 'Readdata':
>
> c1=contour(data,x,y,rgb_table=33,/fill,c_value=userlevels,$
> Position=[0.1, 0.15, 0.9, 0.90],c_color=indgen(levels),$
> title=['Density at t ='+string(time)],,/overplot)
>
> Except of the overplot command, there is no specification how to
> handle the window.
> If I use the following command, I can see the title of my plot in a
> movie, but no contour plot:
>
> loadct, 1
> set_plot,'z',/copy
> device, set_resolution=framedims, set_pixel_depth=24, decomposed=0
>
> for i=0,nframes-1 do begin
> filename ='DATA_000' +strtrim(i,2)+'.tab'
> readdata,filename
>
> xyouts, 0.5, 0.9, 'IDL TITLE', align=0.5, charsize=2, /normal
> timestamp = video.put(stream, tvrd(true=1))
> endfor

Well, I don't know. This is how I would do an animation
of a contour plot:

cgLoadCT, 33
XInterAnimate, Set=[640, 512, 12], /Showload
FOR j=0,11 DO BEGIN
cgContour, cgDemodata(18), /Fill, Background='white', /Outline
XInterAnimate, Frame=j, Window=!D.Window
ENDFOR
XInterAnimate, 20
END

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Black screen movie [message #79593 is a reply to message #79592] Fri, 09 March 2012 06:45 Go to previous message
Sofie Fehlmann is currently offline  Sofie Fehlmann
Messages: 5
Registered: November 2011
Junior Member
On Mar 9, 3:25 pm, David Fanning <n...@idlcoyote.com> wrote:
> Sofie Fehlmann writes:
>> I'm a very beginner and would like to create a movie with IDL. I tried
>> therefore the following:
>
>>    for i=0,n-1 do begin
>>      filename ='DATA_000' +strtrim(i,2)+'.tab'
>
>>      readdata,filename
>
>>      iimage = tvrd(true=3)
>>      xinteranimate,image=iimage,frame=i
>>    endfor
>
>> Readdata is a program which creates (after some calculations) a
>> contour plot. However, when xinteranimate starts, the contour plot
>> appears correctly but not in the xinteranimate frame. Therefore, I get
>> a black screen movie. So, I think something is completely wrong...
>> The same problem happens if I use the 'addvideostream' command. The
>> contour plot seems to appear in a different window.
>> How can I "put" the contour plot which I call with Readdata into a
>> movie frame?
>
> But, you are taking a snapshot of the ReadData window and
> putting that into the animation. Is that what you say is
> not working? Are you sure you are taking the snapshot of the
> right window? Is there anything except black pixels in your
> image? How does ReadData deal with windows?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Yes, I would like to take a snapshot of the Contour plot and put it
into a movie. However, it is not working, there is just a black
screen. This is the main part of my 'Readdata':

c1=contour(data,x,y,rgb_table=33,/fill,c_value=userlevels,$
Position=[0.1, 0.15, 0.9, 0.90],c_color=indgen(levels),$
title=['Density at t ='+string(time)],,/overplot)

Except of the overplot command, there is no specification how to
handle the window.
If I use the following command, I can see the title of my plot in a
movie, but no contour plot:

loadct, 1
set_plot,'z',/copy
device, set_resolution=framedims, set_pixel_depth=24, decomposed=0

for i=0,nframes-1 do begin
filename ='DATA_000' +strtrim(i,2)+'.tab'
readdata,filename

xyouts, 0.5, 0.9, 'IDL TITLE', align=0.5, charsize=2, /normal
timestamp = video.put(stream, tvrd(true=1))
endfor
Re: Black screen movie [message #79595 is a reply to message #79593] Fri, 09 March 2012 06:25 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sofie Fehlmann writes:

> I'm a very beginner and would like to create a movie with IDL. I tried
> therefore the following:
>
> for i=0,n-1 do begin
> filename ='DATA_000' +strtrim(i,2)+'.tab'
>
> readdata,filename
>
> iimage = tvrd(true=3)
> xinteranimate,image=iimage,frame=i
> endfor
>
> Readdata is a program which creates (after some calculations) a
> contour plot. However, when xinteranimate starts, the contour plot
> appears correctly but not in the xinteranimate frame. Therefore, I get
> a black screen movie. So, I think something is completely wrong...
> The same problem happens if I use the 'addvideostream' command. The
> contour plot seems to appear in a different window.
> How can I "put" the contour plot which I call with Readdata into a
> movie frame?

But, you are taking a snapshot of the ReadData window and
putting that into the animation. Is that what you say is
not working? Are you sure you are taking the snapshot of the
right window? Is there anything except black pixels in your
image? How does ReadData deal with windows?

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Matlab!
Next Topic: IDL routines dependencies map maker

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

Current Time: Wed Oct 08 13:48:53 PDT 2025

Total time taken to generate the page: 0.00440 seconds