<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Oops... I've thought this list also came with the list e-mail in the
"reply-to header", sorry. <br>
Now I tried to put a <b>thresh.SetInputArrayToProcess(1, 0, 0, 0,
'test')</b> after the <b>thresh.ThresholdByLower(0.5)</b>. Nothing
happens different yet.<br>
<br>
Thanks,<br>
<br>
Adriano<br>
<br>
Em 17/12/2009 12:12, David Doria escreveu:
<blockquote
cite="mid:c19fcadc0912170612u6f826f22rf9c31cb6c672af6a@mail.gmail.com"
type="cite">
<pre wrap="">2009/12/17 Adriano Gonçalves <a class="moz-txt-link-rfc2396E" href="mailto:adriano@esss.com.br"><adriano@esss.com.br></a>:
</pre>
<blockquote type="cite">
<pre wrap="">Hi, David, thanks for your answer.
I'm setting the data array as follows (these codes bellow are adapted from
different methods and classes):
dimensions = (4, 4, 2) # Dimensions of the grid
sizes = (10, 10, 2)
prop_array = numpy.random.rand(dimensions[0] * dimensions[1] *
dimensions[2]) # Numpy array of random floats, from 0 to 1
property_name = 'test'
numpy_array = prop_array
vtk_array = vtk.vtkDoubleArray()
vtk_array.SetName( property_name )
vtk_array.SetVoidArray( numpy_array, len(numpy_array), 1 )
self.data_set.GetCellData().AddArray( vtk_array ) # self.data_set is
the vtkRectilinearGrid that this method returns to the previous code that
I've sent.
I'm also trying to understand and follow these examples, but I haven't
gotten a success yet...
Thanks!
</pre>
</blockquote>
<pre wrap="">
Let's keep the discussion on the mailing list so everyone can benefit/help.
There you have added the array to the data set, but no where have you
told the threshold filter to use that array to do the thresholding. At
quick glance I wasn't sure what the syntax was for this function:
threshold->SetInputArrayToProcess(....);
But I'm pretty sure that's what you need to do.
Thanks,
David
_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Adriano de Oliveira Gonçalves
Desenvolvedor
ESSS - DEV Rio de Janeiro
<a class="moz-txt-link-abbreviated" href="mailto:adriano@esss.com.br">adriano@esss.com.br</a></pre>
</body>
</html>