Cory,<br>Thanks very much for showing interest and taking the time to help me out.<br><br>I think your explanation makes perfect sense. I do use vtkDataSetMapper...so you hit the bull's eye.<br>I missed the line in the documentation about vtkDataSetMapper. I had been chasing vtkDataSetSurfaceFilter.<br>
<br>That explains why I do not see any performance difference on doing an explicit vtkDataSetSurfaceFiltermyself.<br><br>But I still have little trouble understanding the transparent grid.<br>I made boundary cells all blue and in between cells all red. A transparent 
image of this grid when all cells are rendered is purple (which is 
expected blend of red and blue). This was using just vtkDataSetMapper.<br><br>Now if vtkDataSetMapper is rendering only boundary surfaces( by doing an internal vtkDataSetSurfaceFilter )<br>shouldnt I expect only  a blue image?<br>
<br>Or could it be that when the image is transparent, vtkDataSetSurfaceFilter handles it somewhat differently?<br>Like rendering all surfaces atleast once or something ( just trying to explain the purple color).<br><br>Please let me know what you think of it?<br>
<br>Thanks<br>Bhanu<br><br><br>PS: Would using a vtkUnstructuredGridVolumeMapper instead of a vtkDataSetMapper cause a performance HIT?<br><br><br><br><br><br><br><br><blockquote class="gmail_quote"></blockquote><div class="gmail_quote">
On Wed, Apr 3, 2013 at 9:27 PM, Cory Quammen <span dir="ltr"><<a href="mailto:cquammen@cs.unc.edu" target="_blank">cquammen@cs.unc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Bhanu,<br>
<br>
Could you post a small snippet showing how you are using VTK to render<br>
your unstructured grid?<br>
<br>
I suspect you are using a vtkDataSetMapper. The documentation for this<br>
class says:<br>
<br>
"The 2D faces of 3D cells are mapped only if they are used by only one<br>
cell, i.e., on the boundary of the data set."<br>
<br>
If you are in fact using a vtkDataSetMapper, I believe it is applying<br>
a vtkDataSetSurfaceFilter underneath and rendering only the boundary<br>
polygons. Hence you should see no difference in either image or<br>
performance if you apply the vtkDataSetSurfaceFilter yourself before<br>
sending it to a vtkDataSetMapper.<br>
<br>
If you ever want to render the whole volume, you would need to use<br>
something like a vtkUnstructuredGridVolumeMapper.<br>
<br>
Hope that helps,<br>
Cory<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Apr 3, 2013 at 9:59 PM, Alex Malyushytskyy <<a href="mailto:alexmalvtk@gmail.com">alexmalvtk@gmail.com</a>> wrote:<br>
> As far as I understand if all internal surfaces were eliminated (for example<br>
> by vtkDataSetSurfaceFilter ) you would see only blue,<br>
> but I do not think vtkDataSetSurfaceFilterdoes it.<br>
><br>
> Below is only my assumption, since I did not look in the<br>
> vtkDataSetSurfaceFilter internals and documentation does not answer the<br>
> question, but I would expect that filter only combines small primitives<br>
> which are in the same geometrical plane and are connected into large and<br>
> eliminates duplicates when it works on the unstructured grid .<br>
><br>
> It the array you colored original database is transferred you will see the<br>
> same colors as with original database.<br>
><br>
> Regards,<br>
>       Alex<br>
><br>
><br>
> On Wed, Apr 3, 2013 at 7:42 AM, Bhanu Hariharan <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>> wrote:<br>
>><br>
>> Thanks Alex.<br>
>><br>
>> However the resulting picture (full sized model) is the same. I expected<br>
>> different picture but it is not.<br>
>><br>
>> I made outer cells all blue and in between cells all red. A transparent<br>
>> image of this grid when all cells are rendered is purple (which is expected<br>
>> blend of red and blue).<br>
>><br>
>> But it remains the same image when I render just surface - I expect to see<br>
>> only BLUE?<br>
>> Is this a VTK bug perhaps??<br>
>><br>
>> Thanks again.<br>
>> Bhanu<br>
>><br>
>><br>
>><br>
>> On Tue, Apr 2, 2013 at 6:14 PM, Alex Malyushytskyy <<a href="mailto:alexmalvtk@gmail.com">alexmalvtk@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> I was not suggesting to use VTKActor, cause it means that your<br>
>>> performance at least for large number of nodes<br>
>>> will decrease. I only said it would make a difference ( possibly from<br>
>>> very slow to slow or the same you currently have).<br>
>>><br>
>>> As for opacity, I would expect picture be different, but I would not<br>
>>> expect human eye to see the difference.<br>
>>> Keep in mind that as far as I understand curse model only used during<br>
>>> transition or rotation, resulted picture shown is full sized model,<br>
>>><br>
>>> Regards,<br>
>>>    Alex<br>
>>><br>
>>><br>
>>> On Tue, Apr 2, 2013 at 3:14 PM, Bhanu Hariharan <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>>> wrote:<br>
>>> > Alex,<br>
>>> > I will try your suggestions - using VTKActor to see difference and<br>
>>> > different<br>
>>> > frame rates.<br>
>>> ><br>
>>> > I have one more question that's not related to rendering performance.<br>
>>> > It<br>
>>> > concerns opacity.<br>
>>> ><br>
>>> > I was alteast expecting to see different images when I specify opacity<br>
>>> > < 1<br>
>>> > for the grid.<br>
>>> ><br>
>>> > Shouldn't a transparent image look different when I render all cells<br>
>>> > (all<br>
>>> > layers) than when I render just surface cells?<br>
>>> ><br>
>>> ><br>
>>> > Thanks again,<br>
>>> > Bhanu<br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> > On Tue, Apr 2, 2013 at 4:49 PM, Alex Malyushytskyy<br>
>>> > <<a href="mailto:alexmalvtk@gmail.com">alexmalvtk@gmail.com</a>><br>
>>> > wrote:<br>
>>> >><br>
>>> >> LOD (level of details)  technique consists of run time assessment of<br>
>>> >> performance and building a special model which will be used in certain<br>
>>> >> circumstances and on the one hand would look as close as possible to<br>
>>> >> the original, but on another hand allows achieve desired or better<br>
>>> >> performance.<br>
>>> >> That what LOD actor does, crude models will be silently created and<br>
>>> >> displayed during rotation or when actor is moved.<br>
>>> >><br>
>>> >> Now assume there are 2 model - lets say 1st is your unstructured grid,<br>
>>> >> another is result of dataSetSurfaceFilter.<br>
>>> >> Since both are using LOD actors, the following might happen:<br>
>>> >><br>
>>> >> 1st model is found to be too big to be displayed and as a result crude<br>
>>> >> model with N1 number of nodes is created and displayed<br>
>>> >> 2nd model is found to be too big to be displayed and as a result crude<br>
>>> >> model with N2 number of nodes is created and displayed<br>
>>> >> or it is small enough , so it is displayed as is (but lets say still<br>
>>> >> have N2 nodes)<br>
>>> >><br>
>>> >> Now N1 might be mostly the same as N2.<br>
>>> >> And you see no difference in performance during transition or<br>
>>> >> rotation.<br>
>>> >> Basically this means that LOD actor does his job well enough.<br>
>>> >> I bet if you were using regular actors you would see a huge<br>
>>> >> performance increase.<br>
>>> >><br>
>>> >> If you need further performance you may just specify different frame<br>
>>> >> rate.<br>
>>> >> From <a href="http://www.vtk.org/doc/release/4.0/html/classvtkLODActor.html" target="_blank">http://www.vtk.org/doc/release/4.0/html/classvtkLODActor.html</a>:<br>
>>> >><br>
>>> >> "To control the frame rate, you typically set the<br>
>>> >> vtkRenderWindowInteractor DesiredUpdateRate and StillUpdateRate. This<br>
>>> >> then will cause vtkLODActor to adjust its LOD to fulfill the requested<br>
>>> >> update rate.<br>
>>> >> For greater control on levels of detail, see also vtkLODProp3D. That<br>
>>> >> class allows arbitrary definition of each LOD.<br>
>>> >> "<br>
>>> >><br>
>>> >> Hope this helps,<br>
>>> >><br>
>>> >> Alex<br>
>>> >><br>
>>> >><br>
>>> >><br>
>>> >><br>
>>> >> On Tue, Apr 2, 2013 at 2:18 PM, Bhanu Hariharan <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>>> >> wrote:<br>
>>> >> > Alex,<br>
>>> >> ><br>
>>> >> > To be specific in one of my cases,  No. of surfaces rendered were<br>
>>> >> > reduced<br>
>>> >> > from 6163542 to 373626 assuming grid has hexahedrons each with 6<br>
>>> >> > surfaces. I<br>
>>> >> > got the number 373626 by doing<br>
>>> >> ><br>
>>> >> > dataSetSurfaceFilter->GetOutput()->GetNumberOfCells()<br>
>>> >> ><br>
>>> >> > Thats a significant reduction of number of surfaces. These are<br>
>>> >> > rendered<br>
>>> >> > using VTKLODActor.<br>
>>> >> ><br>
>>> >> > Can you please explain what you mean by "actually shown primitives<br>
>>> >> > during<br>
>>> >> > rotation". What are the shown primitives?<br>
>>> >> ><br>
>>> >> > I am just adding the output of the dataSetSurfaceFilter to a<br>
>>> >> > vtkDataSetMapper and then to a vtkLODActor.<br>
>>> >> ><br>
>>> >> > All I know if no. of surfaces are reduced. Do I need to do/check<br>
>>> >> > something<br>
>>> >> > else?<br>
>>> >> ><br>
>>> >> > If you need something specific to answer more specifically, I can<br>
>>> >> > provide<br>
>>> >> > the details. It would be a great help.<br>
>>> >> ><br>
>>> >> > Thanks,<br>
>>> >> > Bhanu<br>
>>> >> ><br>
>>> >> ><br>
>>> >> > ---------- Forwarded message ----------<br>
>>> >> > From: Alex Malyushytskyy <<a href="mailto:alexmalvtk@gmail.com">alexmalvtk@gmail.com</a>><br>
>>> >> > Date: Tue, Apr 2, 2013 at 4:03 PM<br>
>>> >> > Subject: Re: [vtkusers] Help with VtkDatasetsurface filter<br>
>>> >> > To: "<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
>>> >> ><br>
>>> >> ><br>
>>> >> > You may get only general advice asking general questions.<br>
>>> >> > Compare  the number of nodes/cells you are you are getting from<br>
>>> >> > vtkDataSetSurfaceFilter with<br>
>>> >> > such in the unstructured grid,<br>
>>> >> > Even though it may be significantly decreased in some cases, for<br>
>>> >> > example if LOD actors are used,  they may decrease actually shown<br>
>>> >> > primitives during rotation approximately to the same number and you<br>
>>> >> > will not see any difference in the performance.<br>
>>> >> ><br>
>>> >> > Regards,<br>
>>> >> >     Alex<br>
>>> >> ><br>
>>> >> ><br>
>>> >> > On Tue, Apr 2, 2013 at 8:27 AM, Bhanu Hariharan <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>>> >> > wrote:<br>
>>> >> >> Hi All,<br>
>>> >> >> I was wondering if anyone would be kind enough to answer the<br>
>>> >> >> following<br>
>>> >> >> query<br>
>>> >> >> for me.<br>
>>> >> >><br>
>>> >> >> I had posted this a while back and still havent found the reason<br>
>>> >> >> why<br>
>>> >> >> vtkDataSetSurfaceFilter hasn't made rendering any faster. The<br>
>>> >> >> interaction<br>
>>> >> >> and rendering time to rotate zoom etc seem to be just the same as<br>
>>> >> >> though I<br>
>>> >> >> rendered all cells in the unstructured grid.<br>
>>> >> >> The reason I chose to introduce rendering just surface cells in the<br>
>>> >> >> first<br>
>>> >> >> place was to make rendering faster. But I am surprised it doesnt<br>
>>> >> >> make<br>
>>> >> >> any<br>
>>> >> >> difference at all :(.<br>
>>> >> >> Any words or ideas?<br>
>>> >> >><br>
>>> >> >> Thanks so much<br>
>>> >> >> Bhanu<br>
>>> >> >><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> On Mon, Mar 11, 2013 at 4:30 PM, Bhanu Hariharan<br>
>>> >> >> <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>>> >> >> wrote:<br>
>>> >> >>><br>
>>> >> >>> One related question though. I started using Surface Filter really<br>
>>> >> >>> only<br>
>>> >> >>> for performance reasons.<br>
>>> >> >>><br>
>>> >> >>> I was thinking if I rendered just surface cells, the rendering and<br>
>>> >> >>> rotation etc would be must faster.<br>
>>> >> >>> However I do not find it any different than when I render all<br>
>>> >> >>> cells.<br>
>>> >> >>> What<br>
>>> >> >>> am I missing?<br>
>>> >> >>> Any reasons anyone can think of, please let me know.<br>
>>> >> >>><br>
>>> >> >>><br>
>>> >> >>><br>
>>> >> >>> Thanks,<br>
>>> >> >>> Bhanu<br>
>>> >> >>><br>
>>> >> >>><br>
>>> >> >>><br>
>>> >> >>> On Mon, Mar 11, 2013 at 4:12 PM, Bhanu Hariharan<br>
>>> >> >>> <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>>> >> >>> wrote:<br>
>>> >> >>>><br>
>>> >> >>>> David,<br>
>>> >> >>>> As you suggested, I got it to work using SetGlobalIds and then<br>
>>> >> >>>> retrieving<br>
>>> >> >>>> that using GetGlobalIds. Many thanks for your patience and help.<br>
>>> >> >>>><br>
>>> >> >>>><br>
>>> >> >>>> -Bhanu<br>
>>> >> >>>><br>
>>> >> >>>><br>
>>> >> >>>> On Wed, Mar 6, 2013 at 11:41 AM, Bhanu Hariharan<br>
>>> >> >>>> <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>>> >> >>>> wrote:<br>
>>> >> >>>>><br>
>>> >> >>>>> David,<br>
>>> >> >>>>><br>
>>> >> >>>>> I am using vtk 5.2 - is it possible that this function was not<br>
>>> >> >>>>> defined<br>
>>> >> >>>>> in that version.<br>
>>> >> >>>>><br>
>>> >> >>>>> I get the error that SetOriginalCellIdsName is not a member of<br>
>>> >> >>>>> vtkDataSetSurfaceFilter   :(<br>
>>> >> >>>>><br>
>>> >> >>>>> Bhanu<br>
>>> >> >>>>><br>
>>> >> >>>>><br>
>>> >> >>>>><br>
>>> >> >>>>> On Wed, Mar 6, 2013 at 10:36 AM, David E DeMarle<br>
>>> >> >>>>> <<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>> wrote:<br>
>>> >> >>>>>><br>
>>> >> >>>>>> Give DSF a name for the array.<br>
>>> >> >>>>>> SetOriginalCellIdsName("idsintoDSForsomething")<br>
>>> >> >>>>>> Then retrieve it from the output like<br>
>>> >> >>>>>><br>
>>> >> >>>>>> DSF->GetOutput()->GetCellData()->GetArray("idsintoDSForsomething")<br>
>>> >> >>>>>><br>
>>> >> >>>>>><br>
>>> >> >>>>>> 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<br>
>>> >> >>>>>><br>
>>> >> >>>>>><br>
>>> >> >>>>>> On Wed, Mar 6, 2013 at 11:29 AM, Bhanu Hariharan<br>
>>> >> >>>>>> <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>>> >> >>>>>> wrote:<br>
>>> >> >>>>>>><br>
>>> >> >>>>>>><br>
>>> >> >>>>>>> David,<br>
>>> >> >>>>>>><br>
>>> >> >>>>>>> I had turned on PassThroughCell. But I do not know how to<br>
>>> >> >>>>>>> access<br>
>>> >> >>>>>>> the<br>
>>> >> >>>>>>> new Ids array after the fact.<br>
>>> >> >>>>>>> VTK Doc says something about a 'OrginalCellIds' but I am not<br>
>>> >> >>>>>>> sure<br>
>>> >> >>>>>>> how<br>
>>> >> >>>>>>> to access this.<br>
>>> >> >>>>>>> So I extracted the output of DSF to a vtkPolyData but still<br>
>>> >> >>>>>>> cant<br>
>>> >> >>>>>>> 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<br>
>>> >> >>>>>>><br>
>>> >> >>>>>>><br>
>>> >> >>>>>>> On Wed, Mar 6, 2013 at 9:25 AM, David E DeMarle<br>
>>> >> >>>>>>> <<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>> wrote:<br>
>>> >> >>>>>>>><br>
>>> >> >>>>>>>> Sorry for the confusion, it has been a long time since I<br>
>>> >> >>>>>>>> added<br>
>>> >> >>>>>>>> that<br>
>>> >> >>>>>>>> code the DataSetSurfaceFilter. Turning<br>
>>> >> >>>>>>>> PassThroughCell/PointIds<br>
>>> >> >>>>>>>> in<br>
>>> >> >>>>>>>> fact<br>
>>> >> >>>>>>>> generates a new Ids array, which you can retrieve after the<br>
>>> >> >>>>>>>> fact<br>
>>> >> >>>>>>>> to<br>
>>> >> >>>>>>>> do the<br>
>>> >> >>>>>>>> lookups into the data that is input to the DSF and extract<br>
>>> >> >>>>>>>> particular<br>
>>> >> >>>>>>>> cells/points by their offset (n'th cell in the cell array,<br>
>>> >> >>>>>>>> n'th<br>
>>> >> >>>>>>>> point in the<br>
>>> >> >>>>>>>> point array)<br>
>>> >> >>>>>>>><br>
>>> >> >>>>>>>> However I still recommend making your own ids array and using<br>
>>> >> >>>>>>>> that<br>
>>> >> >>>>>>>> instead of PassThrough. vtkIdFilter will generate them for<br>
>>> >> >>>>>>>> you.<br>
>>> >> >>>>>>>> The<br>
>>> >> >>>>>>>> array<br>
>>> >> >>>>>>>> marked as the active global ids array is treated specially by<br>
>>> >> >>>>>>>> most<br>
>>> >> >>>>>>>> filters<br>
>>> >> >>>>>>>> in that they try to preserve it across operations (including<br>
>>> >> >>>>>>>> threshold and<br>
>>> >> >>>>>>>> DSF). We added this to VTK a few years ago specifically for<br>
>>> >> >>>>>>>> this<br>
>>> >> >>>>>>>> case of<br>
>>> >> >>>>>>>> finding out where particular result values come from (and in<br>
>>> >> >>>>>>>> particular for<br>
>>> >> >>>>>>>> surface selection). So the Threshold and surface filter will<br>
>>> >> >>>>>>>> push<br>
>>> >> >>>>>>>> globalIDS<br>
>>> >> >>>>>>>> forward just fine. Once you get a result, grab the active<br>
>>> >> >>>>>>>> globaIDs<br>
>>> >> >>>>>>>> array,<br>
>>> >> >>>>>>>> look for the values in it, and look them up in the original<br>
>>> >> >>>>>>>> data.<br>
>>> >> >>>>>>>> The<br>
>>> >> >>>>>>>> extract selections filter will do the job of looking them up<br>
>>> >> >>>>>>>> in<br>
>>> >> >>>>>>>> the<br>
>>> >> >>>>>>>> original<br>
>>> >> >>>>>>>> data and pulling them out as a new dataset.<br>
>>> >> >>>>>>>><br>
>>> >> >>>>>>>><br>
>>> >> >>>>>>>> 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<br>
>>> >> >>>>>>>><br>
>>> >> >>>>>>>><br>
>>> >> >>>>>>>> On Wed, Mar 6, 2013 at 10:02 AM, Bhanu Hariharan<br>
>>> >> >>>>>>>> <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>>> >> >>>>>>>> wrote:<br>
>>> >> >>>>>>>>><br>
>>> >> >>>>>>>>> David,<br>
>>> >> >>>>>>>>> Thanks for replying. However I have a doubt.<br>
>>> >> >>>>>>>>> Are you suggesting the VTKUnstructuredgrid should have an<br>
>>> >> >>>>>>>>> globalids<br>
>>> >> >>>>>>>>> array? Is that what the member is called - globalIds? I<br>
>>> >> >>>>>>>>> actually<br>
>>> >> >>>>>>>>> pass<br>
>>> >> >>>>>>>>> VTKUnstructuredgrid  to a VTKThreshold filter and then pass<br>
>>> >> >>>>>>>>> that<br>
>>> >> >>>>>>>>> filter to<br>
>>> >> >>>>>>>>> VTKdatasetsurfacefilter.<br>
>>> >> >>>>>>>>><br>
>>> >> >>>>>>>>> Perhaps you can post a couple lines of code. That would be<br>
>>> >> >>>>>>>>> very<br>
>>> >> >>>>>>>>> helpful.<br>
>>> >> >>>>>>>>> Thanks,<br>
>>> >> >>>>>>>>> Bhanu<br>
>>> >> >>>>>>>>><br>
>>> >> >>>>>>>>><br>
>>> >> >>>>>>>>><br>
>>> >> >>>>>>>>> On Tue, Mar 5, 2013 at 6:55 PM, David E DeMarle<br>
>>> >> >>>>>>>>> <<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>> wrote:<br>
>>> >> >>>>>>>>>><br>
>>> >> >>>>>>>>>> The input data should have a globalids array containing a<br>
>>> >> >>>>>>>>>> unique<br>
>>> >> >>>>>>>>>> value for each cell. If it does, extract will preserve it.<br>
>>> >> >>>>>>>>>> After<br>
>>> >> >>>>>>>>>> the<br>
>>> >> >>>>>>>>>> extraction, use that array in the polydata to do the look<br>
>>> >> >>>>>>>>>> up to<br>
>>> >> >>>>>>>>>> the original<br>
>>> >> >>>>>>>>>> cell in the unstructured grid.<br>
>>> >> >>>>>>>>>><br>
>>> >> >>>>>>>>>> On Mar 5, 2013 6:00 PM, "Bhanu Hariharan"<br>
>>> >> >>>>>>>>>> <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>>> >> >>>>>>>>>> wrote:<br>
>>> >> >>>>>>>>>>><br>
>>> >> >>>>>>>>>>> Hi All,<br>
>>> >> >>>>>>>>>>><br>
>>> >> >>>>>>>>>>> I need some help doing the following. Please could one of<br>
>>> >> >>>>>>>>>>> you<br>
>>> >> >>>>>>>>>>> guide me on how.<br>
>>> >> >>>>>>>>>>><br>
>>> >> >>>>>>>>>>> I use a vtkDataSetSurfaceFilter on VTKUnstructuredGrid to<br>
>>> >> >>>>>>>>>>> render<br>
>>> >> >>>>>>>>>>> skin of that grid. That works fine and I can see the<br>
>>> >> >>>>>>>>>>> number of<br>
>>> >> >>>>>>>>>>> surfaces<br>
>>> >> >>>>>>>>>>> shown by grabbing the<br>
>>> >> >>>>>>>>>>> dataSetSurfaceFilter->GetOutput()->GetNumberOfCells().<br>
>>> >> >>>>>>>>>>><br>
>>> >> >>>>>>>>>>><br>
>>> >> >>>>>>>>>>> I need a way to map the surface back to the original cell<br>
>>> >> >>>>>>>>>>> id.<br>
>>> >> >>>>>>>>>>> That<br>
>>> >> >>>>>>>>>>> is if I have 2 cells and I render just skin, number of<br>
>>> >> >>>>>>>>>>> surfaces<br>
>>> >> >>>>>>>>>>> rendered are<br>
>>> >> >>>>>>>>>>> 10. I need to be able to pick on any of these 10 surfaces<br>
>>> >> >>>>>>>>>>> and<br>
>>> >> >>>>>>>>>>> map<br>
>>> >> >>>>>>>>>>> them back<br>
>>> >> >>>>>>>>>>> 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<br>
>>> >> >>>>>>>>>>> dataset<br>
>>> >> >>>>>>>>>>> will have a celldata array that holds the cell index of<br>
>>> >> >>>>>>>>>>> the<br>
>>> >> >>>>>>>>>>> original 3D cell<br>
>>> >> >>>>>>>>>>> that produced each output cell. This is useful for cell<br>
>>> >> >>>>>>>>>>> picking.<br>
>>> >> >>>>>>>>>>> I turned the PassThroughCellIds On and I have UseStrips<br>
>>> >> >>>>>>>>>>> turned<br>
>>> >> >>>>>>>>>>> off.<br>
>>> >> >>>>>>>>>>><br>
>>> >> >>>>>>>>>>> Then I did<br>
>>> >> >>>>>>>>>>> vtkPolyData *surfacePolyData =<br>
>>> >> >>>>>>>>>>> dataSetSurfaceFilter->GetOutput();<br>
>>> >> >>>>>>>>>>><br>
>>> >> >>>>>>>>>>> But I do not see how I can access that celldata array that<br>
>>> >> >>>>>>>>>>> holds<br>
>>> >> >>>>>>>>>>> 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>
>>> >> >>>>>>>>>>> _______________________________________________<br>
>>> >> >>>>>>>>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> >> >>>>>>>>>>><br>
>>> >> >>>>>>>>>>> Visit other Kitware open-source projects at<br>
>>> >> >>>>>>>>>>> <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:<br>
>>> >> >>>>>>>>>>> <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>
>>> >> >>>>>>>>><br>
>>> >> >>>>>>>><br>
>>> >> >>>>>>><br>
>>> >> >>>>>><br>
>>> >> >>>>><br>
>>> >> >>>><br>
>>> >> >>><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> _______________________________________________<br>
>>> >> >> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> >> >><br>
>>> >> >> Visit other Kitware open-source projects at<br>
>>> >> >> <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:<br>
>>> >> >> <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>
>>> >> > _______________________________________________<br>
>>> >> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> >> ><br>
>>> >> > Visit other Kitware open-source projects at<br>
>>> >> > <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:<br>
>>> >> > <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>
>>> ><br>
>>> ><br>
>>> _______________________________________________<br>
>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>><br>
>>> Visit other Kitware open-source projects at<br>
>>> <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:<br>
>>> <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>
>><br>
><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <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:<br>
> <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>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Cory Quammen<br>
Research Associate<br>
Department of Computer Science<br>
The University of North Carolina at Chapel Hill<br>
</font></span></blockquote></div><br>