<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">That's great.<div><br></div><div>This is very rough, but I was thinking of something like this after setting the programmable filter Output Data Set Type to vtkTable (to test I've created a Wavelet Source and run it through a Gradient filter, and then a Calculator which creates a new value called RTGradMag, which is the magnitude of the gradient vector, then the data is Contoured by RTData value with Compute Scalars checked ON):</div><div><br></div><div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><!--StartFragment-->rt = inputs[0].PointData['RTData']</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">rtg = inputs[0].PointData['RTGradMag']</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">rt_set = sorted(set(rt.reshape((-1,)).tolist()))</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><br></div><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">sums = vtk.vtkDoubleArray()</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">sums.SetName('SummedValues')</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">sums.SetNumberOfComponents(1)</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">conts = vtk.vtkDoubleArray()</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">conts.SetName('ContourValues')</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">conts.SetNumberOfComponents(1)</div><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">for val in rt_set:</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span class="Apple-tab-span" style="white-space:pre">        </span>summed_val = sum(rtg[rt==val].reshape((-1,)).tolist())</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span class="Apple-tab-span" style="white-space:pre">        </span>conts.InsertNextValue(val)</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span class="Apple-tab-span" style="white-space:pre">        </span>sums.InsertNextValue(summed_val)</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span class="Apple-tab-span" style="white-space:pre">        </span>print val, summed_val</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><br></div><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">pdo = self.GetTableOutput()</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">pdo.AddColumn(conts)</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">pdo.AddColumn(sums)</div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><!--EndFragment--></div><div><div>On Sep 30, 2010, at 11:45 AM, Paul Edwards wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I've found out how to access the "Integrate Attributes" - I can import it from vtkPVFiltersPython :)<div><br><div class="gmail_quote">On 30 September 2010 16:17, Paul Edwards <span dir="ltr"><<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Eric,<div><br></div><div>You are right - I would like one row of integrated values per contour. I don't understand how I can do this without "Integrate Attributes" though.</div>
<div><br></div><div>Regards,<br><font color="#888888">
Paul</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On 30 September 2010 15:30, Eric E. Monson <span dir="ltr"><<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Could you be a bit more clear about what you're trying to do? It sounds like you're trying to take your contours and integrate some attributes over each of the contours separately so you get a table which contains as many rows as the number of contours (and maybe separate columns for each attribute)?<div>
<br></div><div>As I was playing around I had trouble creating a programmable filter which has a polygonal mesh as input, but a vtkTable as output... Does anyone know if this is possible? Or, does vtkDataObjectToTable filter exist for ParaView so the data could be run through that before the programmable filter?</div>
<div><br></div><div>If I'm understanding what you're trying to do, it seems like it should be possible to implement with a programmable filter if this piece can be accomplished, even without the Integrate Attributes filter.</div>
<div><br></div><font color="#888888"><div>-Eric</div></font><div><div></div><div><div><br><div><div>On Sep 30, 2010, at 10:20 AM, Paul Edwards wrote:</div><br><blockquote type="cite">Ah - thanks for the tip!<div>
<br></div><div>Does anyone know the way to call this in a programmable filter? Or, is it even wrapped for python?</div><div><br></div><div>Thanks,<br>Paul<br><br><div class="gmail_quote">On 30 September 2010 14:51, Eric E. Monson <span dir="ltr"><<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hey Paul,<div><br></div><div>I don't have an answer to your problem, but just wanted to point out that vtkIntegrateAttributes is not part of VTK proper, but is listed on the ParaView docs pages:</div>
<div><br></div><div><a href="http://www.paraview.org/ParaView3/Doc/Nightly/html/classvtkIntegrateAttributes.html" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/html/classvtkIntegrateAttributes.html</a></div>
<div><br></div><div>-Eric</div><div><br><div>
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>
------------------------------------------------------</div><div>Eric E Monson</div><div>Duke Visualization Technology Group</div><div><br></div></span></div><br><div><div><div></div><div><div>On Sep 30, 2010, at 6:00 AM, Paul Edwards wrote:</div>
<br></div></div><blockquote type="cite"><div><div></div><div>Hi,<div><br></div><div>I'm trying to create a table containing several rows of integrated values for different contours with a programmable filter but I can't see how to use the "Integrate Variables" filter. In filters.xml it show as being called vtkIntegrateAttributes but I cannot create this in python. Also, there is no webpage for this class on the nightly documentation site.</div>
<div><br></div><div>Any help is appreciated,</div><div>Paul<br><br><div class="gmail_quote">On 30 September 2010 08:57, Biddiscombe, John A. <span dir="ltr"><<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</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-GB" link="blue" vlink="purple">
<div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Sorry Paul. I must have clicked reply instead of replay-all. I
intended to post to the list</span></p><div><span style="font-size:11.0pt;color:#1F497D"> </span><br></div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">JB</span></p><div><span style="font-size:11.0pt;color:#1F497D"> </span><br>
</div><div><span style="font-size:11.0pt;color:#1F497D"> </span><br></div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt">From:</span></b><span lang="EN-US" style="font-size:10.0pt"> Paul Edwards
[mailto:<a href="mailto:paul.m.edwards@gmail.com" target="_blank">paul.m.edwards@gmail.com</a>] <br>
<b>Sent:</b> 30 September 2010 09:48<br>
<b>To:</b> Biddiscombe, John A.<br>
<b>Subject:</b> Re: [Paraview] plotting integrated values of cutting plane at
various offsets</span></p>
</div><div><div></div><div><div> <br></div><p class="MsoNormal">Thanks John - I'll have a go with a python programmable
filter today.</p>
<div><div> <br></div>
</div>
<div><p class="MsoNormal">Regards,</p>
</div>
<div><p class="MsoNormal">Paul</p>
</div>
<div><div> <br></div>
<div><p class="MsoNormal">On 30 September 2010 07:19, Biddiscombe, John A. <<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>> wrote:</p>
<div>
<div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Paul</span></p><div><span style="font-size:11.0pt;color:#1F497D"> </span><br></div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I’d knock up a filter which stores the
desired value each time it executes, and increments the list by one on each
execution. This would build up a list (in a polydata or vtkTable for example)
which could then be plotted on a graph. A reset button on a custom panel can be
used to clear the values. I’ve done this a couple of times for time related
filters when I wanted to plot something unusual over T.</span></p><div><span style="font-size:11.0pt;color:#1F497D"> </span><br></div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">JB</span></p><div><span style="font-size:11.0pt;color:#1F497D"> </span><br>
</div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt">From:</span></b><span lang="EN-US" style="font-size:10.0pt"> <a href="mailto:paraview-bounces@paraview.org" target="_blank">paraview-bounces@paraview.org</a> [mailto:<a href="mailto:paraview-bounces@paraview.org" target="_blank">paraview-bounces@paraview.org</a>]
<b>On Behalf Of </b>Paul Edwards<br>
<b>Sent:</b> 29 September 2010 15:53<br>
<b>To:</b> paraview<br>
<b>Subject:</b> [Paraview] plotting integrated values of cutting plane at
various offsets</span></p>
</div>
<div>
<div><div> <br></div><p class="MsoNormal">Hi,</p>
<div><div> <br></div>
</div>
<div><p class="MsoNormal">I
have created a contour and integrated the output to produce a single value.
Is there a way to plot this value as the contour changes? I have
created an animation for the isosurface but cannot see a filter that I could
use to plot these values across the range.</p>
</div>
<div><div> <br></div>
</div>
<div><p class="MsoNormal">Thanks
in advance,</p>
</div>
<div><p class="MsoNormal">Paul</p>
</div>
</div>
</div>
</div>
</div>
</div><div> <br></div>
</div>
</div></div></div>
</div>
</blockquote></div><br></div></div></div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</blockquote></div><br></div></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</blockquote></div><br></div></body></html>