<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
So you have 3 numpy arrays each with 3 complex values?<br>
<br>
In any case you'll use vtk double array for this, and you'll want
to explictly handle real and imaginary parts. PV can iso surface the
real and imaginary parts separately. There are a couple of ways you
could do that. 1) each array of complex values could go into a 2
component vtkDoubleArray, first component is the real part and
second component is the imaginary part. 2) each array of complex
values could go into 2 1 component double arrays, the first double
array for the real part and the second double array for the
imaginary part. Since you mentioned iso surfacing I'm guessing
option 2 will be the easiest path for you. <br>
<br>
Burlen<br>
<br>
<div class="moz-cite-prefix">On 05/21/2014 07:20 AM, Su, Simon M CTR
USARMY ARL (US) wrote:<br>
</div>
<blockquote
cite="mid:F02E4EC9F4B4BA4189BBDC8BF3B2AD820ECE82C7@umechp9h.easf.csd.disa.mil"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">Hello,<br>
<br>
I am calculating the roots using numpy in the python
programmable filter. numpy.roots(coeff) is returning an array of
type ndarray with complex128 array elements.
<br>
<br>
<style type="text/css">
p, li { white-space: pre-wrap; }
BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}</style>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-family:'Courier'; font-size:9pt;
color:#008000;"><type 'numpy.ndarray'></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-family:'Courier'; font-size:9pt;
color:#008000;">[-0.77184451+1.11514251j
-0.77184451-1.11514251j 0.54368901+0.j ]</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-family:'Courier'; font-size:9pt;
color:#008000;">array size = 3</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-family:'Courier'; font-size:9pt;
color:#008000;">(-0.771844506346+1.11514250804j)</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-family:'Courier'; font-size:9pt;
color:#008000;"><type 'numpy.complex128'></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-family:'Courier'; font-size:9pt;
color:#008000;">(-0.771844506346-1.11514250804j)</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-family:'Courier'; font-size:9pt;
color:#008000;"><type 'numpy.complex128'></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-family:'Courier'; font-size:9pt;
color:#008000;">(0.543689012692+0j)</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style=" font-family:'Courier'; font-size:9pt;
color:#008000;"><type 'numpy.complex128'></span></p>
<br>
<br>
In my calculation I will have 3 roots so I will be creating
three variables root1, root2, root3, and add them to the output
data via<br>
<br>
<pre class="de1">output.<span class="me1">GetPointData</span><span class="br0">(</span><span class="br0">)</span>.<span class="me1">AddArray</span><span class="br0">(</span><span class="br0">root1)
</span>output.<span class="me1">GetPointData</span><span class="br0">(</span><span class="br0">)</span>.<span class="me1">AddArray</span><span class="br0">(</span><span class="br0">root2)
</span>output.<span class="me1">GetPointData</span><span class="br0">(</span><span class="br0">)</span>.<span class="me1">AddArray</span><span class="br0">(</span><span class="br0">root3)
</span>
</pre>
what would the vtk type that I need to use to create root1,
root2, and root3?<br>
<br>
Can ParaView draw an isosurface using root1, or root2, or root3?<br>
<br>
Any help on this is much appreciated.<br>
<br>
thanks<br>
-simon<br>
<br>
<br>
<br>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
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 ParaView Wiki at: <a class="moz-txt-link-freetext" href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a>
</pre>
</blockquote>
<br>
</body>
</html>