Hi All,<br>I was wondering if anyone would be kind enough to answer the following query for me.<br><br>I had posted this a while back and still havent found the reason why vtkDataSetSurfaceFilter hasn't made rendering any faster. The interaction and rendering time to rotate zoom etc seem to be just the same as though I rendered all cells in the unstructured grid.<br>
The reason I chose to introduce rendering just surface cells in the first place was to make rendering faster. But I am surprised it doesnt make any difference at all :(.<br>Any words or ideas?<br><br>Thanks so much<br>Bhanu<br>
<br><br><br><div class="gmail_quote">On Mon, Mar 11, 2013 at 4:30 PM, Bhanu Hariharan <span dir="ltr"><<a href="mailto:bhanu@petrotel.com" target="_blank">bhanu@petrotel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
One related question though. I started using Surface Filter really only for performance reasons.<br><br>I was thinking if I rendered just surface cells, the rendering and rotation etc would be must faster.<br>However I do not find it any different than when I render all cells. What am I missing?<br>

Any reasons anyone can think of, please let me know.<br><br><br><br>Thanks,<br>Bhanu<div class="HOEnZb"><div class="h5"><br><br><br><div class="gmail_quote">On Mon, Mar 11, 2013 at 4:12 PM, Bhanu Hariharan <span dir="ltr"><<a href="mailto:bhanu@petrotel.com" target="_blank">bhanu@petrotel.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">David,<br>As you suggested, I got it to work using SetGlobalIds and then retrieving that using GetGlobalIds. Many thanks for your patience and help.<span><font color="#888888"><br>

<br><br>-Bhanu</font></span><div><div><br><br><div class="gmail_quote">On Wed, Mar 6, 2013 at 11:41 AM, Bhanu Hariharan <span dir="ltr"><<a href="mailto:bhanu@petrotel.com" target="_blank">bhanu@petrotel.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">David,<br><br>I am using vtk 5.2 - is it possible that this function was not defined in that version.<br><br>I get the error that SetOriginalCellIdsName is not a member of vtkDataSetSurfaceFilter   :(<span><font color="#888888"><br>


<br>Bhanu</font></span><div><div><br><br><br>
<div class="gmail_quote">On Wed, Mar 6, 2013 at 10:36 AM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div dir="ltr">Give DSF a name for the array. SetOriginalCellIdsName("idsintoDSForsomething")<div>Then retrieve it from the output like DSF->GetOutput()->GetCellData()->GetArray("idsintoDSForsomething")</div>





<div><br></div></div><div class="gmail_extra"><div><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div>
<br><br></div><div><div><div class="gmail_quote">On Wed, Mar 6, 2013 at 11:29 AM, Bhanu Hariharan <span dir="ltr"><<a href="mailto:bhanu@petrotel.com" target="_blank">bhanu@petrotel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>David,<br><br>I had turned on PassThroughCell. But I do not know how to access the new Ids array after the fact.<br>VTK Doc says something about a 'OrginalCellIds' but I am not sure how to access this.<br>So I extracted the output of DSF to a vtkPolyData but still cant figure out how to get to that new Ids array.<br>






Any help with that is really appreciated.<br><br>I will try your other suggestion in the meantime.<br><br>Thanks,<br>Bhanu<div><div><br><br><div class="gmail_quote">On Wed, Mar 6, 2013 at 9:25 AM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br>






<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Sorry for the confusion, it has been a long time since I added that code the DataSetSurfaceFilter. Turning PassThroughCell/PointIds in fact generates a new Ids array, which you can retrieve after the fact to do the lookups into the data that is input to the DSF and extract particular cells/points by their offset (n'th cell in the cell array, n'th point in the point array)</div>








<div><br></div><div>However I still recommend making your own ids array and using that instead of PassThrough. vtkIdFilter will generate them for you. The array marked as the active global ids array is treated specially by most filters in that they try to preserve it across operations (including threshold and DSF). We added this to VTK a few years ago specifically for this case of finding out where particular result values come from (and in particular for surface selection). So the Threshold and surface filter will push globalIDS forward just fine. Once you get a result, grab the active globaIDs array, look for the values in it, and look them up in the original data. The extract selections filter will do the job of looking them up in the original data and pulling them out as a new dataset.</div>






<span><font color="#888888">

<div>
<div><br></div></div></font></span><div class="gmail_extra"><span><font color="#888888"><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>
Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div></font></span><div><div>


<br><br><div class="gmail_quote">On Wed, Mar 6, 2013 at 10:02 AM, Bhanu Hariharan <span dir="ltr"><<a href="mailto:bhanu@petrotel.com" target="_blank">bhanu@petrotel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">









David,<br>Thanks for replying. However I have a doubt.<br>Are you suggesting the VTKUnstructuredgrid should have an globalids array? Is that what the member is called - globalIds? I actually pass VTKUnstructuredgrid  to a VTKThreshold filter and then pass that filter to VTKdatasetsurfacefilter.<br>










<br>Perhaps you can post a couple lines of code. That would be very helpful.<br>Thanks,<br>Bhanu<div><div><br><br><br><div class="gmail_quote">On Tue, Mar 5, 2013 at 6:55 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br>










<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>The input data should have a globalids array containing a unique value for each cell. If it does, extract will preserve it. After the extraction, use that array in the polydata to do the look up to the original cell in the unstructured grid.</p>












<div class="gmail_quote"><div><div>On Mar 5, 2013 6:00 PM, "Bhanu Hariharan" <<a href="mailto:bhanu@petrotel.com" target="_blank">bhanu@petrotel.com</a>> wrote:<br type="attribution"></div></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hi All,<br><br>I need some help doing the following. Please could one of you guide me on how.<br><br>I use a vtkDataSetSurfaceFilter on VTKUnstructuredGrid to render skin of that grid. That works fine and I can see the number of surfaces shown by grabbing the <br>












dataSetSurfaceFilter->GetOutput()->GetNumberOfCells().<br><br><br>I need a way to map the surface back to the original cell id. That is if I have 2 cells and I render just skin, number of surfaces rendered are 10. I need to be able to pick on any of these 10 surfaces and map them back to either of the the 2 grid cells.<br>












<br><br><a href="http://www.vtk.org/doc" target="_blank">http://www.vtk.org/doc</a> says :<br><br>If PassThroughCellIdsOn is 1, then the output polygonal dataset will have a celldata array that holds the 
cell index of the original 3D cell that produced each output cell. This 
is useful for cell picking.<br>I turned the PassThroughCellIds On and I have UseStrips turned off.<br><br>Then I did<br>vtkPolyData *surfacePolyData = dataSetSurfaceFilter->GetOutput();<br><br>But I do not see how I can access that celldata array that holds the original 3D cells for the surfaces.<br>












<br>Please can anyone advise on how.<br><br>Thanks in advance.<br>Bhanu<br><br><br><br><br><br>
<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>
</blockquote></div><br>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>