<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi, good afternoon for everybody!<br>
I'm with a difficulty in using the vtkThreshold: I'm trying to kill, in
a vtkRectilinearGrid, all the cells with value lower than a specific
value. But, when I try to render the result, nothing appears. Can
anybody give me a help? This is my code:<br>
<br>
thresh = vtk.vtkThreshold()<br>
thresh.SetInput(vtk_grid.GetDataSet()) <b>#
vtk_grid.GetDataSet()</b> returns me a vtkRectilinearGrid <br>
thresh.ThresholdByLower(0.5)<b> # The values of the cells are
from 0 to 1</b><br>
<br>
gridMapper = vtk.vtkDataSetMapper()<br>
gridMapper.SetInputConnection(thresh.GetOutputPort())<br>
<br>
gridActor = vtk.vtkActor()<br>
gridActor.SetMapper(gridMapper)<br>
<br>
ren1 = vtk.vtkRenderer()<br>
ren1.AddActor(gridActor)<br>
ren1.AddActor(gridActor)<br>
<br>
ren1.SetBackground(0, 0, 0)<br>
<br>
renWin = vtk.vtkRenderWindow()<br>
renWin.AddRenderer(ren1)<br>
renWin.SetSize(500, 500)<br>
<br>
iren = vtk.vtkRenderWindowInteractor()<br>
iren.SetRenderWindow(renWin)<br>
iren.Initialize()<br>
iren.Start()<br>
<br>
<br>
Thank you so much!<br>
<pre class="moz-signature" cols="72">--
Adriano
</pre>
</body>
</html>