<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Jeff,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks for the extra explanation—I think it’s starting to make
more sense.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I don’t know of a VTK primer on the wiki—which doesn’t
necessarily mean it’s not there.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>What this all really means is that I need to go back and re-do
the VTK book, now that I have enough background to understand what’s going on. 
That should probably be a standard directive:  “After working with VTK for 3.75
months, you should re-read the book!”<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>-bob</span><span
style='color:#1F497D'> <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Meddle not in the affairs of wizards, for they are subtle and </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>quick to anger.</span><span style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'> <br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>**********************************************************************</span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> <br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>   Robert Kerr,  Titan Informatics Toolkit Developer<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>  
rakerr@sandia.gov         |   
PO Box 5800,  MS 1323         </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>   Phone: (505) 844-8606   
|    Sandia National
Labs          </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>   Fax: (505)
284-2518        |  Albuquerque, NM
87185-1323      </span><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'><br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>**********************************************************************</span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Jeff Baumes
[mailto:jeff.baumes@kitware.com] <br>
<b>Sent:</b> Tuesday, October 12, 2010 1:37 PM<br>
<b>To:</b> Kerr, Robert<br>
<b>Cc:</b> vtk-developers@vtk.org<br>
<b>Subject:</b> Re: [vtk-developers] Intersecting tables, documentation, and me<o:p></o:p></span></p>

</div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

<p class=MsoNormal style='margin-left:.5in'>On Tue, Oct 12, 2010 at 3:09 PM,
Kerr, Robert <<a href="mailto:rakerr@sandia.gov">rakerr@sandia.gov</a>>
wrote:<o:p></o:p></p>

<div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<p class=MsoNormal style='margin-left:.5in'>Recently I've been working on something
that involves vtkExtractSelectedRows.  I finally got my issues (well, at
least my programming ones) worked out, and everything is peachy-keen.  But
it was harder than I'd expected.  Here's a description of some of my
frustration.<br>
<br>
<br>
Here's what I read about vtkExtractSelectedRows:<br>
<br>
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv<br>
Detailed Description<br>
<br>
return selected rows of a table<br>
<br>
The first input is a vtkTable to extract rows from. The second input is a
vtkSelection containing the selected indices. The third input is a
vtkAnnotationLayers containing selected indices. The field type of the input
selection is ignored when converted to row indices.<br>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
<br>
And yet, the first input isn't a vtkTable, rather it's a vtkAlgorithmOutput.
 The second input is not a vtkSelection, rather it also is a
vtkAlgorithmOutput.<o:p></o:p></p>

</blockquote>

<div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'>You can use a vtkTable and
vtkSelection as the inputs by doing the following:<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'>alg->SetInput(0, table);<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'>alg->SetInput(1, selection);<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'>These are convenience methods, and
behind the scenes they do indeed call GetProducerPort() internally. The indices
are also only needed when specifying a port other than the first port (port
zero), which is the default. These methods should not be used when making true
pipeline connections between one algorithm and another. In that case you
generally do<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'>alg->SetInputConnection(upstream_alg->GetOutputPort());<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'>Notice that in all these cases,
type checking is not explicit at compile time. SetInput and SetInputConnection
take vtkDataObject and vtkAlgorithmOutput, respectively. This is to allow
general API in the algorithm superclass and also to give algorithms flexibility
to input and produce different types of data objects in different scenarios at
runtime.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in'>Scrabbling around through the docs, I found a link to
a test case for vtkExtractSelectedRows, and was able to figure out the correct
voodoo to make it work, but it certainly wasn't clear from the documentation.<br>
<br>
Is it just "understood" that when we say an input is a vtkTable we
instead mean vtkTable->GetProducerPort() and so on?  Is this written
anywhere in the docs?  I know I'm probably exposing my abysmal ignorance
of all things VTK by speaking out here, but neither would I want to contribute
to the VTK Conspiracy of 1492, which (I imagine) states that "knowing how
to convert from a vtkTable to a vtkAlgorithmOutput is implicitly required for
anyone using VTK".<o:p></o:p></p>

</blockquote>

<div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<div>

<div>

<p class=MsoNormal style='margin-left:.5in'>The bulk of VTK documentation uses
this language of "the first input is such-and-such type", and you are
right that this underlying knowledge of the pipeline is often inferred. The VTK
books do a good job of explaining the pipeline model, is there perhaps no
equivalent "VTK primer" on the wiki?<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'>Jeff<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'> <o:p></o:p></p>

</div>

</div>

</div>

</div>

</body>

</html>