<div dir="ltr">This does what you are looking for:<div>
<pre style="margin:12px 0px 0px;text-indent:0px"><span style="font-family:Monaco;font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:Monaco"> </span><span style="font-family:Monaco;font-weight:600;color:rgb(0,0,255)">vtk</span></pre>
<pre style="margin:0px;text-indent:0px;font-family:Monaco;font-weight:600;color:rgb(0,0,255)"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco;font-style:italic;color:rgb(64,128,128)"># copy entire structure across</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco;color:rgb(0,128,0)">self</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">GetOutputDataObject(</span><span style="font-family:Monaco;color:rgb(102,102,102)">0</span><span style="font-family:Monaco">)</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">ShallowCopy(</span><span style="font-family:Monaco;color:rgb(0,128,0)">self</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">GetInputDataObject(</span><span style="font-family:Monaco;color:rgb(102,102,102)">0</span><span style="font-family:Monaco">,</span><span style="font-family:Monaco;color:rgb(102,102,102)">0</span><span style="font-family:Monaco">))</span></pre>
<pre style="margin:0px;text-indent:0px;font-family:Monaco"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco;font-style:italic;color:rgb(64,128,128)"># use pass arrays to extract a copy with one array of interest</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco">myArrays</span><span style="font-family:Monaco;color:rgb(102,102,102)">=</span><span style="font-family:Monaco">vtk</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">vtkPassArrays()</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco">myArrays</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">SetInputDataObject(</span><span style="font-family:Monaco;color:rgb(0,128,0)">self</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">GetInputDataObject(</span><span style="font-family:Monaco;color:rgb(102,102,102)">0</span><span style="font-family:Monaco">,</span><span style="font-family:Monaco;color:rgb(102,102,102)">0</span><span style="font-family:Monaco">))</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco">myArrays</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">ClearArrays()</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco">myArrays</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">AddPointDataArray(</span><span style="font-family:Monaco;color:rgb(186,33,33)">'DISPL'</span><span style="font-family:Monaco">)</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco">myArrays</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">AddCellDataArray(</span><span style="font-family:Monaco;color:rgb(186,33,33)">''</span><span style="font-family:Monaco">)</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco">myArrays</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">AddFieldDataArray(</span><span style="font-family:Monaco;color:rgb(186,33,33)">''</span><span style="font-family:Monaco">)</span></pre>
<pre style="margin:0px;text-indent:0px;font-family:Monaco"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco;font-style:italic;color:rgb(64,128,128)"># use point2cell to operate on the one array we care about</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco">p2c </span><span style="font-family:Monaco;color:rgb(102,102,102)">=</span><span style="font-family:Monaco"> vtk</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">vtkPointDataToCellData()</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco">p2c</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">SetInputConnection(myArrays</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">GetOutputPort())</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco">p2c</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">Update()</span></pre>
<pre style="margin:0px;text-indent:0px;font-family:Monaco"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco;font-style:italic;color:rgb(64,128,128)"># iterate over blocks and copy in the result</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco;color:rgb(0,128,0)">iter</span><span style="font-family:Monaco;color:rgb(102,102,102)">=</span><span style="font-family:Monaco">dsa</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">MultiCompositeDataIterator([p2c</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">GetOutputDataObject(</span><span style="font-family:Monaco;color:rgb(102,102,102)">0</span><span style="font-family:Monaco">), output])</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco;font-weight:600;color:rgb(0,128,0)">for</span><span style="font-family:Monaco"> in_block, output_block </span><span style="font-family:Monaco;font-weight:600;color:rgb(170,34,255)">in</span><span style="font-family:Monaco"> </span><span style="font-family:Monaco;color:rgb(0,128,0)">iter</span><span style="font-family:Monaco">:</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="font-family:Monaco"> output_block</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">GetCellData()</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">AddArray(in_block</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">VTKObject</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">GetCellData()</span><span style="font-family:Monaco;color:rgb(102,102,102)">.</span><span style="font-family:Monaco">GetArray(</span><span style="font-family:Monaco;color:rgb(186,33,33)">'DISPL'</span><span style="font-family:Monaco">))</span></pre>
<pre style="margin:0px 0px 12px;text-indent:0px;font-family:Monaco"><br></pre><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>David E DeMarle<br>Kitware, Inc.<br>Principal Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Apr 30, 2018 at 8:52 AM, Dennis Conklin <span dir="ltr"><<a href="mailto:dennis_conklin@goodyear.com" target="_blank">dennis_conklin@goodyear.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div class="m_3572968779741755257WordSection1">
<p class="MsoNormal">David,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have not called filters within the Programmable Filter before and I am not getting things hooked up correctly. My attempt is attached. Clearly, I do not understand how to hook the output of 1 filter to the input of the next because
I’m getting to the end and getting something with no blocks and no cells. <u></u>
<u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Any hints?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Dennis<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> David E DeMarle [mailto:<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.<wbr>com</a>]
<br>
<b>Sent:</b> Tuesday, April 10, 2018 10:14 AM<br>
<b>To:</b> Dennis Conklin <<a href="mailto:dennis_conklin@goodyear.com" target="_blank">dennis_conklin@goodyear.com</a>><br>
<b>Cc:</b> Paraview (<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>) <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br>
<b>Subject:</b> [EXT] Re: [Paraview] vtkPointDataToCellData but only for selected PointData<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<table class="m_3572968779741755257MsoNormalTable" border="1" cellspacing="1" cellpadding="0" style="background:lightgrey;border:outset gray 1.0pt">
<tbody>
<tr>
<td style="padding:.6pt .6pt .6pt .6pt">
<p class="MsoNormal"> <strong><span style="font-family:"Calibri",sans-serif;color:red">WARNING - External email; exercise caution.</span></strong><u></u><u></u></p>
</td>
</tr>
</tbody>
</table><div><div class="h5">
<p> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">The pass arrays filter comes to mind. <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">If creating withing your python programmable filter it will be called vtk.vtkPassArrays then follow that with a vtk.vtkPointDataToCellData.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">David E DeMarle<br>
Kitware, Inc.<br>
Principal Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: 518-881-4909<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Apr 10, 2018 at 10:07 AM, Dennis Conklin <<a href="mailto:dennis_conklin@goodyear.com" target="_blank">dennis_conklin@goodyear.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">All,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Well, this list solved my problem so easily (and made me feel slightly less than the sharpest pencil in the box) yesterday, so I thought I’d try again.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I am doing some Python calcs inside a programmable filter and some of the results I want to average from the Points onto the Cells. But, I don’t want all my PointData moved over
to CellData – I want to transfer some of them over within my Filter.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Right now I’m looping thru all the elements and finding all their nodes, then averaging them and assigning to the cells. It is dog slow and is choking off the usefulness of this
filter.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Is there anything like vtkPointDataToCellData that lets me specify which quantities to convert – could I do something tricky like store original list of PointData, make up a new
list, then run PointDataToCellData, then restore the list of PointData ??<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I realize this may have all sorts of unexpected side effects, so I’m just asking!<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks again, this group is great!<u></u><u></u></p>
<p class="MsoNormal"><span style="color:#888888"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#888888">Dennis<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
______________________________<wbr>_________________<br>
Powered by <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=01%7C01%7Cdennis_conklin%40goodyear.com%7Ccdd327b7b83443c9224908d59eed5011%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=bFpbI9%2F4eHwIrhf5Sd9f2ynzY%2FvWHiDIlONgpO13J0A%3D&reserved=0" target="_blank">
www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=01%7C01%7Cdennis_conklin%40goodyear.com%7Ccdd327b7b83443c9224908d59eed5011%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=mMExlGeMQKwAob7IUdPyH60WLz420BhmCRMs%2Fp8aLf4%3D&reserved=0" target="_blank">
http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fparaview.org%2FWiki%2FParaView&data=01%7C01%7Cdennis_conklin%40goodyear.com%7Ccdd327b7b83443c9224908d59eed5011%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=Myi6SWCBnXGSlGEpOScpW0tc83nT6ue%2FjmtzC9G%2FafE%3D&reserved=0" target="_blank">
http://paraview.org/Wiki/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3DParaView&data=01%7C01%7Cdennis_conklin%40goodyear.com%7Ccdd327b7b83443c9224908d59eed5011%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=EjvocgHSmoROe1cbBbTsWfGgqv8v1dZM10sKupDOaQQ%3D&reserved=0" target="_blank">
http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fparaview&data=01%7C01%7Cdennis_conklin%40goodyear.com%7Ccdd327b7b83443c9224908d59eed5011%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=tfp1j3M04VCMkOFcmkMdKNLgIKDJUYvgEupl18nNQeE%3D&reserved=0" target="_blank">https://public.kitware.com/<wbr>mailman/listinfo/paraview</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>