<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div>Dear Bill,</div><div><br></div><div>Thanks for your time.<br></div><div><br></div><div>Ofcourse I tried "warped_poly=warp->GetOutput();" before sending the email. It does not work! It gives the following error:</div><br><div>error C2679: binary '=': no operator found which takes a right-hand operand of type 'vtkPointSet *' (or there is no acceptable conversion)</div><div><br></div><div>Since Cory told "vtkWarpVector should produce a vtkPolyData" I thought "warped_poly = warp;" might work. Ok I was wrong.<br></div><div><br></div><div>There should be sth else going on here. As in the same example in the new site, still vtksmartpointer is not used for this case. There should be a reason for that:</div><div><br></div><div><a href="https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/DataSetSurfaceFilter/">https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/DataSetSurfaceFilter/</a><div><br></div><div><pre><span class="ydpcf9e5d86hll"> <span class="ydpcf9e5d86n">vtkPolyData</span><span class="ydpcf9e5d86o">*</span> <span class="ydpcf9e5d86n">polydata</span> <span class="ydpcf9e5d86o">=</span> <span class="ydpcf9e5d86n">surfaceFilter</span><span class="ydpcf9e5d86o">-></span><span class="ydpcf9e5d86n">GetOutput</span><span class="ydpcf9e5d86p">();</span></span></pre><br></div>I finally could get the data using vtkDataSetSurfaceFilter as Cory said. But still I dont undersatand the problem with direct polydata and why not smart pointer?<br></div><div><br></div><div>Any help?</div><div><br></div><div>Thanks.<br></div><div><br></div></div>
<div><br></div><div><br></div>
<div id="yahoo_quoted_7512282860" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Friday, January 26, 2018, 4:50:22 PM GMT+2, Bill Lorensen <bill.lorensen@gmail.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">1. The error message tells you what is wrong. You need:<br clear="none">warped_poly=warp->GetOutput();<br clear="none"><br clear="none">2. Please go to this site:<br clear="none"><a shape="rect" href="https://lorensen.github.io/VTKExamples/site/ " target="_blank">https://lorensen.github.io/VTKExamples/site/ </a>for examples. The wiki<br clear="none">site is not supported any more<br clear="none"><br clear="none">Try looking at the VTK Book(which is free). <a shape="rect" href="https://www.vtk.org/vtk-textbook/" target="_blank">https://www.vtk.org/vtk-textbook/</a><br clear="none"><br clear="none">And the examples from the book:<br clear="none"><a shape="rect" href="https://lorensen.github.io/VTKExamples/site/VTKBookFigures/" target="_blank">https://lorensen.github.io/VTKExamples/site/VTKBookFigures/</a><br clear="none"><br clear="none"><div class="yqt0674311365" id="yqtfd89587"><br clear="none">On Fri, Jan 26, 2018 at 1:30 AM, Majid Mohammad sadeghi via vtkusers<br clear="none"><<a shape="rect" ymailto="mailto:vtkusers@vtk.org" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>> wrote:<br clear="none">> I have 2 questions:<br clear="none">><br clear="none">> 1.Why is this compile error happening?<br clear="none">><br clear="none">> vtkSmartPointer<vtkPolyDataNormals> normals<br clear="none">> =vtkSmartPointer<vtkPolyDataNormals>::New();<br clear="none">> normals->SetInputData(notSmoothedRotatedX);<br clear="none">> normals->SplittingOff();<br clear="none">><br clear="none">> vtkSmartPointer<vtkWarpVector> warp<br clear="none">> =vtkSmartPointer<vtkWarpVector>::New();<br clear="none">> warp->SetInputConnection(normals->GetOutputPort());<br clear="none">> warp->SetInputArrayToProcess(0, 0,<br clear="none">> 0,vtkDataObject::FIELD_ASSOCIATION_POINTS,vtkDataSetAttributes::NORMALS);<br clear="none">> warp->SetScaleFactor(1.2);<br clear="none">> warp->Update();<br clear="none">><br clear="none">> vtkSmartPointer<vtkPolyData> warped_poly =<br clear="none">> vtkSmartPointer<vtkPolyData>::New();<br clear="none">> warped_poly = warp;<br clear="none">><br clear="none">> error C2664: 'vtkPolyData *vtkSmartPointer<vtkPolyData>::CheckType(T *)':<br clear="none">> cannot convert argument 1 from 'vtkWarpVector *' to 'vtkPolyData *'<br clear="none">><br clear="none">><br clear="none">> 2. I wonder why sometimes in VTK a vtkpolydata is created without using a<br clear="none">> smart pointer?<br clear="none">><br clear="none">> Like in this example:<br clear="none">><br clear="none">> <a shape="rect" href="https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter" target="_blank">https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter</a><br clear="none">><br clear="none">> Thanks.<br clear="none">><br clear="none">><br clear="none">> On Thursday, January 25, 2018, 2:21:03 PM GMT+2, Cory Quammen<br clear="none">> <<a shape="rect" ymailto="mailto:cory.quammen@kitware.com" href="mailto:cory.quammen@kitware.com">cory.quammen@kitware.com</a>> wrote:<br clear="none">><br clear="none">><br clear="none">> vtkWarpVector should produce a vtkPolyData. If it doesn't you can<br clear="none">> always use vtkDataSetSurface to get a vtkPolyData surface from the<br clear="none">> output of vtkWarpVector.<br clear="none">><br clear="none">> - Cory<br clear="none">><br clear="none">> On Thu, Jan 25, 2018 at 6:27 AM, Majid Mohammad sadeghi via vtkusers<br clear="none">> <<a shape="rect" ymailto="mailto:vtkusers@vtk.org" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>> wrote:<br clear="none">>> Dear All,<br clear="none">>><br clear="none">>> When I scale a polydata by a uniform scale like: (2,2,2) , the data aslo<br clear="none">>> moves a bit towards a direction depending on where the origin is located<br clear="none">>> in<br clear="none">>> relation to the polydata.<br clear="none">>><br clear="none">>> Is there a way to make the scaling transformation work as if each surface<br clear="none">>> is<br clear="none">>> moved relative to its normal? (I want an effect like an offset of the<br clear="none">>> shape)<br clear="none">>><br clear="none">>> I know there is vtkwarpvector but I can not give its output to a plydata.<br clear="none">>> (or maybe I am wrong!)<br clear="none">>><br clear="none">>> Any help?<br clear="none">>><br clear="none">>> Thanks.<br clear="none">>><br clear="none">>> _______________________________________________<br clear="none">>> Powered by www.kitware.com<br clear="none">>><br clear="none">>> Visit other Kitware open-source projects at<br clear="none">>> <a shape="rect" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br clear="none">>><br clear="none">>> Please keep messages on-topic and check the VTK FAQ at:<br clear="none">>> <a shape="rect" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br clear="none">>><br clear="none">>> Search the list archives at: <a shape="rect" href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=vtkusers</a><br clear="none">>><br clear="none">>> Follow this link to subscribe/unsubscribe:<br clear="none">>> <a shape="rect" href="https://vtk.org/mailman/listinfo/vtkusers" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><br clear="none">><br clear="none">>><br clear="none">><br clear="none">><br clear="none">><br clear="none">> --<br clear="none">> Cory Quammen<br clear="none">> Staff R&D Engineer<br clear="none">> Kitware, Inc.<br clear="none">><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> Powered by www.kitware.com<br clear="none">><br clear="none">> Visit other Kitware open-source projects at<br clear="none">> <a shape="rect" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br clear="none">><br clear="none">> Please keep messages on-topic and check the VTK FAQ at:<br clear="none">> <a shape="rect" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br clear="none">><br clear="none">> Search the list archives at: <a shape="rect" href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=vtkusers</a><br clear="none">><br clear="none">> Follow this link to subscribe/unsubscribe:<br clear="none">> <a shape="rect" href="https://vtk.org/mailman/listinfo/vtkusers" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a></div><br clear="none">><br clear="none"><br clear="none"><br clear="none"><br clear="none">-- <br clear="none">Unpaid intern in BillsParadise at noware dot com<div class="yqt0674311365" id="yqtfd79440"><br clear="none"></div></div></div>
</div>
</div></div></body></html>