Hi Dominik,<br>thanks for your reply, this makes sense and was along the lines of what I have been trying.  Can you tell me how you arrived at 0, and 1 for the fieldAssociation values?  Is that just the order of the  enumerator list located at:<br>

<br><a href="http://www.vtk.org/doc/nightly/html/classvtkDataObject.html#a54fdf8345a01c89e618feca3c10002b1">http://www.vtk.org/doc/nightly/html/classvtkDataObject.html#a54fdf8345a01c89e618feca3c10002b1</a><br><br>Thanks,<br clear="all">

Seth<span style="font-family:courier new,monospace"><br></span><br><br><br>
<br><br><div class="gmail_quote">On Wed, Jun 15, 2011 at 3:12 PM, Dominik Szczerba <span dir="ltr">&lt;<a href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I never used the filter (in such cases I recommend custom filters) but<br>
may be able to clarify some confusion about SetInputArrayToProcess. It<br>
just explicitly tells the filter which array and of which type to take<br>
in case there are multiple ones:<br>
<br>
<a href="http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html#a6bea16e1329609dbccce0ff8d2367484" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html#a6bea16e1329609dbccce0ff8d2367484</a><br>
<br>
Typical use:<br>
<br>
SetInputArrayToProcess(0,0,0,0,&quot;PointScalar&quot;);<br>
SetInputArrayToProcess(0,0,0,1,&quot;CellMarker&quot;);<br>
<br>
Good luck<br>
Dominik<br>
<div><div></div><div class="h5"><br>
<br>
On Wed, Jun 15, 2011 at 8:25 PM, Seth Gilchrist &lt;<a href="mailto:seth@mech.ubc.ca">seth@mech.ubc.ca</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt; Sorry to bump, but I&#39;m still struggling with this and can&#39;t find any<br>
&gt; good help in my books or online.  I have the &quot;VTK Users Guide&quot; and<br>
&gt; &quot;The Visualization Toolkit: An Object-Oriented Approach to 3-D<br>
&gt; Graphics,&quot; but neither of them is any help in this case.<br>
&gt;<br>
&gt; Can anybody help with this question?  Examples, hints, whatever you<br>
&gt; can do is really appreciated.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Seth<br>
&gt;<br>
&gt; Previous message:<br>
&gt; Hello,<br>
&gt; I have the unstructured grid image printed at end of this email, with two<br>
&gt; point data sets &quot;Dispamcement&quot; (vectors) and &quot;Optimizer Value&quot; (scalors).  I<br>
&gt; want to use vtkCellDerivatives to calculate the strain tensors from the<br>
&gt; &quot;Displacement&quot; point data.  I can&#39;t figure out how to input the data into<br>
&gt; vtkCellDerivatives.  I have tried:<br>
&gt;<br>
&gt; vtkCellDerivatives  *dCalc = vtkCellDerivatives::New();<br>
&gt; dCalc-&gt;<br>
&gt; SetTensorModeToComputeStrain();<br>
&gt; dCalc-&gt;SetInput( image-&gt;GetPointData()-&gt;GetArray(&quot;Displacement&quot;) );<br>
&gt; dCalc-&gt;Update();<br>
&gt;<br>
&gt; and<br>
&gt;<br>
&gt; vtkCellDerivatives  *dCalc = vtkCellDerivatives::New();<br>
&gt; dCalc-&gt;SetTensorModeToComputeStrain();<br>
&gt; dCalc-&gt;SetInput(image);<br>
&gt; dCalc-&gt;SetInputArrayToProcess( [uh...I get lost here, I&#39;ve tried a lot of<br>
&gt; things]  );<br>
&gt; dCalc-&gt;Update();<br>
&gt;<br>
&gt; I either can&#39;t get it to compile, or the output of the filter is the same as<br>
&gt; the input.<br>
&gt;<br>
&gt; Can anybody point me in the right direction?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Seth<br>
&gt;<br>
&gt; The cells in the image are quadratic tets.<br>
&gt;<br>
&gt; image-&gt;Print( std::cout )...<br>
&gt;<br>
&gt; vtkUnstructuredGrid (0x10f1150)<br>
&gt;  Debug: Off<br>
&gt;  Modified Time: 268<br>
&gt;  Reference Count: 1<br>
&gt;  Registered Events: (none)<br>
&gt;  Source: (none)<br>
&gt;  Information: 0x10e6130<br>
&gt;  Data Released: False<br>
&gt;  Global Release Data: Off<br>
&gt;  UpdateTime: 269<br>
&gt;  Release Data: Off<br>
&gt;  UpdateExtent: Not Initialized<br>
&gt;  Update Number Of Pieces: 1<br>
&gt;  Update Piece: 0<br>
&gt;  Update Ghost Level: 0<br>
&gt;  MaximumNumberOfPieces: 1<br>
&gt;  RequestExactExtent: Off<br>
&gt;   Field Data:<br>
&gt;    Debug: Off<br>
&gt;    Modified Time: 252<br>
&gt;    Reference Count: 1<br>
&gt;    Registered Events: (none)<br>
&gt;    Number Of Arrays: 0<br>
&gt;    Number Of Components: 0<br>
&gt;    Number Of Tuples: 0<br>
&gt;  Number Of Points: 81<br>
&gt;  Number Of Cells: 30<br>
&gt;  Cell Data:<br>
&gt;    Debug: Off<br>
&gt;    Modified Time: 259<br>
&gt;    Reference Count: 1<br>
&gt;    Registered Events: (none)<br>
&gt;    Number Of Arrays: 0<br>
&gt;    Number Of Components: 0<br>
&gt;    Number Of Tuples: 0<br>
&gt;    Copy Tuple Flags: ( 1 1 1 1 1 0 1 )<br>
&gt;    Interpolate Flags: ( 1 1 1 1 1 0 0 )<br>
&gt;    Pass Through Flags: ( 1 1 1 1 1 1 1 )<br>
&gt;    Scalars: (none)<br>
&gt;    Vectors: (none)<br>
&gt;    Normals: (none)<br>
&gt;    TCoords: (none)<br>
&gt;    Tensors: (none)<br>
&gt;    GlobalIds: (none)<br>
&gt;    PedigreeIds: (none)<br>
&gt;  Point Data:<br>
&gt;    Debug: Off<br>
&gt;    Modified Time: 268<br>
&gt;    Reference Count: 1<br>
&gt;    Registered Events: (none)<br>
&gt;    Number Of Arrays: 2<br>
&gt;    Array 0 name = Displacement<br>
&gt;    Array 1 name = Optimizer Value<br>
&gt;    Number Of Components: 4<br>
&gt;    Number Of Tuples: 81<br>
&gt;    Copy Tuple Flags: ( 1 1 1 1 1 0 1 )<br>
&gt;    Interpolate Flags: ( 1 1 1 1 1 0 0 )<br>
&gt;    Pass Through Flags: ( 1 1 1 1 1 1 1 )<br>
&gt;    Scalars: (none)<br>
&gt;    Vectors: (none)<br>
&gt;    Normals: (none)<br>
&gt;    TCoords: (none)<br>
&gt;    Tensors: (none)<br>
&gt;    GlobalIds: (none)<br>
&gt;    PedigreeIds: (none)<br>
&gt;  Bounds:<br>
&gt;    Xmin,Xmax: (57.5, 67.3)<br>
&gt;    Ymin,Ymax: (45.7, 56.7)<br>
&gt;    Zmin,Zmax: (41.7, 59.1)<br>
&gt;  Compute Time: 283<br>
&gt;  Number Of Points: 81<br>
&gt;  Point Coordinates: 0x10e7890<br>
&gt;  Locator: 0<br>
&gt;  Number Of Pieces: 1<br>
&gt;  Piece: 0<br>
&gt;  Ghost Level: 0<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
</blockquote></div><br>