enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.3k stars 285 forks source link

VTK warnings when modifying pipeline #3

Open GaelVaroquaux opened 13 years ago

GaelVaroquaux commented 13 years ago

Reported by Maik Beckmann:

This code

from enthought.mayavi import mlab

pts = mlab.points3d([0,1], [0,1], [0,1])
pts.mlab_source.set(x=[0,2])

works, but gives

ERROR: In /build/src/VTK/Filtering/vtkExecutive.cxx, line 756
vtkStreamingDemandDrivenPipeline (0x59b4900): Algorithm
vtkAssignAttribute(0x59bd8a0) returned failure for request:
vtkInformation (0x5ad6c60)
  Debug: Off
  Modified Time: 818743
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  ALGORITHM_AFTER_FORWARD:

where this is the emitting code in vtkExecutive.cxx in vtkExecutive::CallAlgorithm(...)

   ...
  // If the algorithm failed report it now.
  if(!result)
    {
    vtkErrorMacro("Algorithm " << this->Algorithm->GetClassName()
                  << "(" << this->Algorithm
                  << ") returned failure for request: "
                  << *request);
    }
  ...

Though its reported as an error by vtk, it doesn't seem to break anything.

cfarrow commented 13 years ago

I'd love to have a fix or workaround for this. I'm using mayavi in a demo coming up and the error messages are a big detractor from the beauty of the demo.

jtaylor commented 12 years ago

I am also looking for a resolution or workaround for this.

youm commented 12 years ago

Exactly the same problem, has someone found a workaround ?

GaelVaroquaux commented 12 years ago

Exactly the same problem, has someone found a workaround ?

The pipeline code in Mayavi needs to be rewritten to use the new VTK pipeline design. I suspect that there is a few days work, maybe a week. Given Prabhu's workload and mine's it is a bit hard to find that time. That's why nothing is happening.

willyd commented 10 years ago

+1 for a fix for this issue.

Temporary workaround, redirect error messages to a log file:

import vtk
output=vtk.vtkFileOutputWindow()
output.SetFileName("log.txt")
vtk.vtkOutputWindow().SetInstance(output)
mdickinson commented 10 years ago

Confirmed with current Mayavi.

@GaelVaroquaux, @prabhuramachandran: could either of you provide a brief explanation of the underlying cause? I'm a bit lost in the VTK details.

SjoerdOptLand commented 9 years ago

+1 for a fix

jessicaabreu commented 9 years ago

+1 for a fix

bcorfman commented 8 years ago

+1 for a fix

stefanoborini commented 8 years ago

Still present.

solarjoe commented 7 years ago

Still present. +1 for a fix.

solarjoe commented 7 years ago

I tried a few things and found another workaround.

This will print the error messages: plt = mlab.points3d(x, y, z)

But if you set the forth parameter ("scalars") the error messages are gone. This works fine for me: plt = mlab.points3d(x, y, z, np.ones_like(x))

The size of the glyphs can be adjusted by using the keywords 'scale_mode' and 'scale_factor'.

zhucaoxiang commented 7 years ago

I agree with solarjoe's solution. There might be something wrong with the auto scalars.