[vtkusers] 'Aborted' message with VTK3.2 and Python

Juerg Tschirren juerg-tschirren at uiowa.edu
Sun Jul 8 19:32:48 EDT 2001


I have a problem with the Python script I appended below this message.
Everything seems to go well till the last line. When iren.Start() is
executed I get the mssage 'Aborted' on my screen and the VTK window
closes. Any idea what's wrong? (BTW, the Python examples that come with
VTK run fine on my system).
  And in general, is there I way to switch VTK into "verbose" mode so I
can see what's going on when tracking down a problem like this?

thanks

Juerg


from libVTKCommonPython import *
from libVTKGraphicsPython import *
from Numeric import *
import analyze
from vtkImageImportFromArray import *

#--- load the analyze file and convert it into a vtk structure:
ana = analyze.readAnalyze('skeleton')  #read the analyze image volume
conv = vtkImageImportFromArray()
conv.SetArray(ana[1])                  #ana[3] contains a 3D NumPy array

#--- threshold the data:
thresholdPnt = vtkThresholdPoints()
thresholdPnt.SetInput(conv.GetOutput())
thresholdPnt.ThresholdBetween(200, 255)

#--- a cube source for vtkGlyph3D:
cubes = vtkCubeSource()
cubes.SetXLength(0.5)
cubes.SetYLength(0.5)
cubes.SetZLength(0.5)

glyph = vtkGlyph3D()
glyph.SetInput(thresholdPnt.GetOutput())
glyph.SetSource(cubes.GetOutput())

glyphMapper = vtkPolyDataMapper()
glyphMapper.SetInput(glyph.GetOutput())

actor=vtkActor()
actor.SetMapper(glyphMapper)

ren=vtkRenderer()
ren.AddActor(actor)

win=vtkRenderWindow()
win.AddRenderer(ren)

iren=vtkRenderWindowInteractor()
iren.SetRenderWindow(win)
iren.Initialize()
iren.Start()






More information about the vtkusers mailing list