[vtkusers] QVTKWidget slow rendering

Clinton Stimpson clinton at elemtech.com
Fri Jun 10 14:06:22 EDT 2011


On Friday, June 10, 2011 08:58:27 am Daniele Giunchi wrote:
> Dear All,
> I try some example in VTK-5.6 compiled with VS2008 on WIndows XP,
> using Qt-4.7.2.
> In particular I tested a vtk Structured Points (~50 Mb) in two
> different examples, using basically this code:
> 
> ---------------------------------------------------------------------------
> ---------------- /Load dataSet
>  vtkDataSetReader *reader = vtkDataSetReader::New();
>  reader->SetFileName("vtkTestVolume.vtk");
>  reader->Update();
> 
>  vtkContourFilter* cf = vtkContourFilter::New();
>  cf->UseScalarTreeOn();
>  cf->SetInputConnection(reader->GetOutputPort());
>  cf->SetNumberOfContours(1);
>  cf->SetValue(0, 30000);
> 
>  // Mapper
>  VTK_CREATE(vtkPolyDataMapper, mapper);
>  mapper->ImmediateModeRenderingOn();
>  mapper->SetInputConnection(cf->GetOutputPort());
> ---------------------------------------------------------------------------
> ---
> 
> and the two examples are:
> 
> 1) Cone5.cxx (direct opengl rendering)
> 2) SimpleView.cxx (using QVTKWidget rendering)
> 
> The same data, on first example render with an acceptable frame rate,
> while the second is incredibly slow.
> Using the widget also in our test application, we notice the same latency.
> Have you got any suggestion for this ?

So all other parameters are equal?  You're not compare a debug build with a 
release build?

Is it also a problem if you modify Cone5.cxx to use a QVTKWidget similar to 
VTK/Examples/GUI/Qt/ImageViewer.main.cxx?

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com



More information about the vtkusers mailing list