[vtkusers] how to reset input to a writer?
Jesse Neri
neri at hobbes.nrl.navy.mil
Wed Jul 10 12:03:36 EDT 2002
And the answer is to send the Modified command to the
WindowToImageFilter before each call of Write to the Writer.
As in:
this->wif->Modified();
before the
this->bmpWriter->Write();
--
Jess Neri neri at hobbes.nrl.navy.mil (202) 404-4365
Pulsed Power Physics Branch, Plasma Physics Division
Naval Research Laboratory, Washington DC 20375
> -----Original Message-----
> From: vtkusers-admin at public.kitware.com
> [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Dean Inglis
> Sent: Wednesday, July 10, 2002 11:23 AM
> To: vtkusers
> Subject: [vtkusers] how to reset input to a writer?
>
>
> Hi,
>
> I tried this question last month without success and now it
> has come up
> again.
> I'm building movie frame generator functionality into an (not
> available yet)
> interactor event recorder that writes the playback of
> previously recorded
> events to a numbered sequence of bitmap images. The pipeline
> consists of:
>
> vtkWindowToImageFilter wif
> vtkBMPWriter bmpWriter
>
> The interactor event recorder (this) owns the wif and the
> bmpWriter and a
> reference to a vtkRenderWindowInteractor:
>
> Prior to start of the playback loop:
> if ( this->RecordMovie )
> {
>
> this->wif->SetInput((vtkWindow*)this->Interactor->GetRenderWindow());
> this->FrameNumber = 0;
> }
>
> within the playback loop:
>
> while ( reading_events_from_a_file )
> {
> get_event_info_from_file();
> make_interactor_invoke_event();
> if (this_is_a_movie_recordable_event)
> {
> this->bmpWriter->SetInput(this->wif->GetOutput());
> char* name = create_a_movie_file_name(this->FrameNumber);
> this->bmpWriter->SetFileName(name);
> this->bmpWriter->Write();
> delete [] name;
> this->FrameNumber++;
> }
> }
>
> The problem is that the images are all the same: bmpWriter
> doesn't change
> its input.
> How do I 'reset' the bmpWriter/wif pair to update?
>
> Dean
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list