[vtkusers] vtkWindowToImageFilter and TvtkBorlandRenderWindow

Anders Vestbo anders at fmri.no
Tue Apr 19 09:45:37 EDT 2005


hi,

I am trying to use the vtkWindowToImageFilter to save some snapshots to 
a (tiff-)file. I have encapsulated a vtk render window on a standard 
TForm component in Borland C++ Builder using the TvtkBorlandRenderWindow 
component class (provided in Examples/GUI/Win32/vtkBorland). However, 
the following code does not seem to work, i.e. it simply crashes with an 
"Access violation":

//TvtkBorlandRenderWindow *vtkRenderWindow1

vtkRenderWindow *renWin = vtkRenderWindow1->GetRenderWindow();

vtkWindowToImageFilter *filter = vtkWindowToImageFilter::New();
vtkTIFFWriter *writer = vtkTIFFWriter::New();

filter->SetInput(renWin);
filter->Update();        <-----crash
...

anyone have any idea why this happens??

Anders Vestbo



More information about the vtkusers mailing list