[vtkusers] VTK7.0 vtkWindowToImageFilter setViewPort, CRASH

minyang yangmin_hust at 126.com
Wed Aug 17 05:35:02 EDT 2016


With VTK7.0, the codes crash with "windowToImageFilter->Update()", it works
well with VTK5.10.1. I found the reason is "setViewPort()". Any one know how
to make it work well with VTK7.0? Thanks in advance. Below is my codes,

  vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter =
vtkSmartPointer<vtkWindowToImageFilter>::New();
  windowToImageFilter->SetInput(render_Win_p_);
  windowToImageFilter->SetMagnification(1); 
  windowToImageFilter->SetInputBufferTypeToRGB(); //also record the alpha
(transparency) channel
  windowToImageFilter->ReadFrontBufferOff(); // read from the back buffer
  windowToImageFilter->SetViewport(0.2, 0, 0.8, 1);
  windowToImageFilter->Update();

Best Regards,
min



--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK7-0-vtkWindowToImageFilter-setViewPort-CRASH-tp5739802.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list