[vtkusers] Profiling VTK/Performance improvements (with Python)

Felix Mayr felix.mayr at tum.de
Tue Jan 15 11:50:35 EST 2019


Dear vtkusers,

I'm currently working on volumetric visualization of 
StructuredGrid-data. I'm using python to create the grids from numpy 
arrays. My basic pipeline is:
grid (1.2GiB, dimensions: 241x241x721) → vtkIsoContourFilter (setting a 
nonexistent value, as I want to change this dynamically) → 
vtkClipPolyData (using an ImplicitFunction generated from PolyData) → 
vtkPolyDataNormals (for nice shading) → vtkPolyDataMapper → vtkActor 
(which is stored and added to the scene at a later date).

Now, I have constructed a Tk-GUI (using the vtkTkRenderWindowInteractor) 
and update the IsoContourFilter with new contour values. And well, this 
process is slow (as well as pipeline creation) and I would seriously 
like to improve performance and find the bottleneck if there's any.
Specifically (VTK 8.1.2):
     - I don't have a graphics card available on my dev machine. 
Basically I'm just using the Haswell-era integrated-graphics. On another 
machine I am running with LLVM-accelerated mesa and it's behaving the 
same. I don't think this is the problem.
     - can I somehow time the execution of pipeline parts on updates? 
(to find, what takes so long)
     - do the filters I use support SMP (in the python-wrapping?). I 
compiled it with all parallelization-related variables enabled, but CPU 
still doesn't go beyond 100%.
or is it just an insane dataset and I should start with a sensible VOI 
of it?

Best Regards

Felix Mayr
<felix.mayr at tum.de>
Technical University of Munich, Simulation of Nanosystems for Energy 
Conversion [www.sne.ei.tum.de]


More information about the vtkusers mailing list