<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>// Clip data<br>vtkSmartPointer<vtkClipDataSet> clipDataSet = vtkSmartPointer<vtkClipDataSet>::New();<br>clipDataSet->SetClipFunction(plane);<br>clipDataSet->SetInputConnection(model->GetProducerPort());<br>clipDataSet->InsideOutOn();<br>clipDataSet->GenerateClippedOutputOn();<br><br>//PROBLEM HERE. The print shows that there aren't any arrays on the output data<br>clipDataSet->GetOutput()->Print(std::cout);</div></div></blockquote><div><br></div><div>You haven't updated the clipDataSet filter yet at this point, so the output should be empty here. If you do add a call to clipDataSet->Update(), you should see that the output has the arrays you expect. Let us know if it doesn't.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>// Warp the data. <br>vtkSmartPointer<vtkWarpVector> warpingVector = vtkSmartPointer<vtkWarpVector>::New();<br>warpingVector->SetInput(clipDataSet->GetOutput());<br>warpingVector->Update();</div></div></blockquote><div><br></div><div>Could you try calling</div><div><br></div><div>warpingVector->SetInputArrayToProcess(0, 0, 0, vtkDataObject::<span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:22px;white-space:nowrap"> FIELD_ASSOCIATION_POINTS</span>, "Displacements");</div><div><br></div><div>This should tell the vtkWarpVector object to displace by your "Displacements" array.</div><div><br></div><div>HTH,</div><div>Cory</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>// Filter the data because vtkFeatureEdges needs polydata as input<br>vtkSmartPointer<vtkGeometryFilter> outGeometryFilter = vtkSmartPointer<vtkGeometryFilter>::New();<br>outGeometryFilter->SetInput(warpingVector->GetOutput());<br><br>//Create a filter to only draw the boundaries of the displaced mesh<br>vtkSmartPointer<vtkFeatureEdges> drawOnlyBoundaries = vtkSmartPointer<vtkFeatureEdges>::New();<br>drawOnlyBoundaries->SetInputConnection(outGeometryFilter->GetOutputPort());<br></div><div>// configuration of drawOnlyBoundaries, it is not important<br>drawOnlyBoundaries->BoundaryEdgesOn(); drawOnlyBoundaries->ManifoldEdgesOff();<br>drawOnlyBoundaries->NonManifoldEdgesOff(); drawOnlyBoundaries->Update();<br><br></div><div>/* Here I omitted the code to display the mesh using clipDataSet->GetOutputPort() as input*/ <br>/* Also, the code to configure the mapper and actor using drawOnlyBoundaries as input */<div><br></div><div><div><br></div></div></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div></div>