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"><<a href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>></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,"PointScalar");<br>
SetInputArrayToProcess(0,0,0,1,"CellMarker");<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 <<a href="mailto:seth@mech.ubc.ca">seth@mech.ubc.ca</a>> wrote:<br>
> Hello,<br>
> Sorry to bump, but I'm still struggling with this and can't find any<br>
> good help in my books or online. I have the "VTK Users Guide" and<br>
> "The Visualization Toolkit: An Object-Oriented Approach to 3-D<br>
> Graphics," but neither of them is any help in this case.<br>
><br>
> Can anybody help with this question? Examples, hints, whatever you<br>
> can do is really appreciated.<br>
><br>
> Cheers,<br>
> Seth<br>
><br>
> Previous message:<br>
> Hello,<br>
> I have the unstructured grid image printed at end of this email, with two<br>
> point data sets "Dispamcement" (vectors) and "Optimizer Value" (scalors). I<br>
> want to use vtkCellDerivatives to calculate the strain tensors from the<br>
> "Displacement" point data. I can't figure out how to input the data into<br>
> vtkCellDerivatives. I have tried:<br>
><br>
> vtkCellDerivatives *dCalc = vtkCellDerivatives::New();<br>
> dCalc-><br>
> SetTensorModeToComputeStrain();<br>
> dCalc->SetInput( image->GetPointData()->GetArray("Displacement") );<br>
> dCalc->Update();<br>
><br>
> and<br>
><br>
> vtkCellDerivatives *dCalc = vtkCellDerivatives::New();<br>
> dCalc->SetTensorModeToComputeStrain();<br>
> dCalc->SetInput(image);<br>
> dCalc->SetInputArrayToProcess( [uh...I get lost here, I've tried a lot of<br>
> things] );<br>
> dCalc->Update();<br>
><br>
> I either can't get it to compile, or the output of the filter is the same as<br>
> the input.<br>
><br>
> Can anybody point me in the right direction?<br>
><br>
> Thanks,<br>
> Seth<br>
><br>
> The cells in the image are quadratic tets.<br>
><br>
> image->Print( std::cout )...<br>
><br>
> vtkUnstructuredGrid (0x10f1150)<br>
> Debug: Off<br>
> Modified Time: 268<br>
> Reference Count: 1<br>
> Registered Events: (none)<br>
> Source: (none)<br>
> Information: 0x10e6130<br>
> Data Released: False<br>
> Global Release Data: Off<br>
> UpdateTime: 269<br>
> Release Data: Off<br>
> UpdateExtent: Not Initialized<br>
> Update Number Of Pieces: 1<br>
> Update Piece: 0<br>
> Update Ghost Level: 0<br>
> MaximumNumberOfPieces: 1<br>
> RequestExactExtent: Off<br>
> Field Data:<br>
> Debug: Off<br>
> Modified Time: 252<br>
> Reference Count: 1<br>
> Registered Events: (none)<br>
> Number Of Arrays: 0<br>
> Number Of Components: 0<br>
> Number Of Tuples: 0<br>
> Number Of Points: 81<br>
> Number Of Cells: 30<br>
> Cell Data:<br>
> Debug: Off<br>
> Modified Time: 259<br>
> Reference Count: 1<br>
> Registered Events: (none)<br>
> Number Of Arrays: 0<br>
> Number Of Components: 0<br>
> Number Of Tuples: 0<br>
> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )<br>
> Interpolate Flags: ( 1 1 1 1 1 0 0 )<br>
> Pass Through Flags: ( 1 1 1 1 1 1 1 )<br>
> Scalars: (none)<br>
> Vectors: (none)<br>
> Normals: (none)<br>
> TCoords: (none)<br>
> Tensors: (none)<br>
> GlobalIds: (none)<br>
> PedigreeIds: (none)<br>
> Point Data:<br>
> Debug: Off<br>
> Modified Time: 268<br>
> Reference Count: 1<br>
> Registered Events: (none)<br>
> Number Of Arrays: 2<br>
> Array 0 name = Displacement<br>
> Array 1 name = Optimizer Value<br>
> Number Of Components: 4<br>
> Number Of Tuples: 81<br>
> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )<br>
> Interpolate Flags: ( 1 1 1 1 1 0 0 )<br>
> Pass Through Flags: ( 1 1 1 1 1 1 1 )<br>
> Scalars: (none)<br>
> Vectors: (none)<br>
> Normals: (none)<br>
> TCoords: (none)<br>
> Tensors: (none)<br>
> GlobalIds: (none)<br>
> PedigreeIds: (none)<br>
> Bounds:<br>
> Xmin,Xmax: (57.5, 67.3)<br>
> Ymin,Ymax: (45.7, 56.7)<br>
> Zmin,Zmax: (41.7, 59.1)<br>
> Compute Time: 283<br>
> Number Of Points: 81<br>
> Point Coordinates: 0x10e7890<br>
> Locator: 0<br>
> Number Of Pieces: 1<br>
> Piece: 0<br>
> Ghost Level: 0<br>
</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 VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
</blockquote></div><br>