Cory, <br>Actually my question is just the opposite. I am getting identical images not different. I expected different images with and without the surface filter. <br><br>The images are same and performances are same indicating that both vtkDataSetMapper and vtkDataSetSurfaceFilter are behaving identical as you first pointed out.<br>
<br>I am using vtkLODActor and the default is the middle level of detail. I havent done anything to change LOD.<br><br>I get identical images - purple surfaces in between indicating that internal surfaces are infact getting rendered "for transparent grid".<br>
Maybe for opaque grid, they both render just surfaces but for transparent they are rendering internal surfaces somehow.<br><br>Still need to dig some more looks like.<br><br>Thanks,<br>Bhanu<br><br><br><br><div class="gmail_quote">
On Thu, Apr 4, 2013 at 10:21 AM, 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">
The LOD actor might be causing the differences in the image. Which LOD<br>
actor are you using?  If you are using vtkLODActor, then you might be<br>
getting the middle level of detail which is a point sampling of the<br>
unstructured mesh rather than the surface (see the documentation:<br>
<a href="http://www.vtk.org/doc/nightly/html/classvtkLODActor.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkLODActor.html</a>). That would<br>
explain the purple. When fed the output of the surface filter, this<br>
LOD actor would be sampling only from the surface. That would explain<br>
the blue.<br>
<br>
The vtkDataSetSurfaceFilter won't do anything for you other than<br>
ensure that only the surface is displayed when using an LOD technique.<br>
It will also give you the boundary geometry that you could potentially<br>
use for purposes other than display.<br>
<span class="HOEnZb"><font color="#888888"><br>
Cory<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, Apr 4, 2013 at 11:08 AM, Bhanu Hariharan <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>> wrote:<br>
> Cory,<br>
> I have pasted a code snippet. Let me know if you need to know anything else.<br>
> I really need to know the answers.<br>
> It is starting to look like using a DataSetSurfaceFilter is of no use if it<br>
> is going to give me same result (performance and image) as the<br>
> vtkDataSetMapper that I had already been using.<br>
><br>
> Starting to wonder when does one use a datasetsurfacefilter anyway if<br>
> vtkdatasetmapper can get the same job done.<br>
><br>
><br>
>    If( ShowOnlySurface )<br>
>     {<br>
>             MyDataSetSurfaceFilter->SetInput( MyThresholdFilter->GetOutput()<br>
> );<br>
>             MyDataSetSurfaceFilter->Update();<br>
><br>
>            MyDataSetMapper->SetInput( MyDataSetSurfaceFilter->GetOutput());<br>
>    }<br>
>    else<br>
>    {<br>
>             MyDataSetMapper->SetInput( MyThresholdFilter->GetOutput());<br>
>     }<br>
><br>
> MyLODActor->SetMapper(MyDataSetMapper);<br>
> MyRenderer->AddActor(MyLODActor);<br>
><br>
> Thanks,<br>
> Bhanu<br>
><br>
><br>
><br>
> On Thu, Apr 4, 2013 at 9:29 AM, Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>> wrote:<br>
>><br>
>> Bhanu,<br>
>><br>
>> It's hard to know exactly what might be going on without seeing some<br>
>> code or images. I would think, like you, that the two images should be<br>
>> the same when the surface property is set to semi-transparent.<br>
>><br>
>> Using a vtkUnstructuredGridVolumeMapper will almost certainly be<br>
>> slower than using vtkUnstructuredGridVolumeMapper because volume<br>
>> rendering is in general much more computationally intensive than<br>
>> surface rendering.<br>
>><br>
>> Cory<br>
>><br>
>> On Thu, Apr 4, 2013 at 10:18 AM, Bhanu Hariharan <<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>><br>
>> wrote:<br>
>> > Cory,<br>
>> > Thanks very much for showing interest and taking the time to help me<br>
>> > out.<br>
>> ><br>
>> > I think your explanation makes perfect sense. I do use<br>
>> > vtkDataSetMapper...so<br>
>> > you hit the bull's eye.<br>
>> > I missed the line in the documentation about vtkDataSetMapper. I had<br>
>> > been<br>
>> > chasing vtkDataSetSurfaceFilter.<br>
>> ><br>
>> > That explains why I do not see any performance difference on doing an<br>
>> > 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<br>
>> > transparent<br>
>> > image of this grid when all cells are rendered is purple (which is<br>
>> > expected<br>
>> > blend of red and blue). This was using just vtkDataSetMapper.<br>
>> ><br>
>> > Now if vtkDataSetMapper is rendering only boundary surfaces( by doing an<br>
>> > internal vtkDataSetSurfaceFilter )<br>
>> > shouldnt I expect only  a blue image?<br>
>> ><br>
>> > Or could it be that when the image is transparent,<br>
>> > vtkDataSetSurfaceFilter<br>
>> > handles it somewhat differently?<br>
>> > Like rendering all surfaces atleast once or something ( just trying to<br>
>> > 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<br>
>> > vtkDataSetMapper cause a performance HIT?<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > On Wed, Apr 3, 2013 at 9:27 PM, Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>><br>
>> > wrote:<br>
>> >><br>
>> >> 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>
>> >><br>
>> >> On Wed, Apr 3, 2013 at 9:59 PM, Alex Malyushytskyy<br>
>> >> <<a href="mailto:alexmalvtk@gmail.com">alexmalvtk@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > As far as I understand if all internal surfaces were eliminated (for<br>
>> >> > 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<br>
>> >> > the<br>
>> >> > question, but I would expect that filter only combines small<br>
>> >> > primitives<br>
>> >> > which are in the same geometrical plane and are connected into large<br>
>> >> > and<br>
>> >> > eliminates duplicates when it works on the unstructured grid .<br>
>> >> ><br>
>> >> > It the array you colored original database is transferred you will<br>
>> >> > see<br>
>> >> > 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>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> Thanks Alex.<br>
>> >> >><br>
>> >> >> However the resulting picture (full sized model) is the same. I<br>
>> >> >> expected<br>
>> >> >> different picture but it is not.<br>
>> >> >><br>
>> >> >> I made outer cells all blue and in between cells all red. A<br>
>> >> >> transparent<br>
>> >> >> image of this grid when all cells are rendered is purple (which is<br>
>> >> >> expected<br>
>> >> >> blend of red and blue).<br>
>> >> >><br>
>> >> >> But it remains the same image when I render just surface - I expect<br>
>> >> >> to<br>
>> >> >> 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<br>
>> >> >> <<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<br>
>> >> >>> 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<br>
>> >> >>> not<br>
>> >> >>> expect human eye to see the difference.<br>
>> >> >>> Keep in mind that as far as I understand curse model only used<br>
>> >> >>> 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<br>
>> >> >>> <<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<br>
>> >> >>> > and<br>
>> >> >>> > different<br>
>> >> >>> > frame rates.<br>
>> >> >>> ><br>
>> >> >>> > I have one more question that's not related to rendering<br>
>> >> >>> > performance.<br>
>> >> >>> > It<br>
>> >> >>> > concerns opacity.<br>
>> >> >>> ><br>
>> >> >>> > I was alteast expecting to see different images when I specify<br>
>> >> >>> > opacity<br>
>> >> >>> > < 1<br>
>> >> >>> > for the grid.<br>
>> >> >>> ><br>
>> >> >>> > Shouldn't a transparent image look different when I render all<br>
>> >> >>> > 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<br>
>> >> >>> >> assessment<br>
>> >> >>> >> of<br>
>> >> >>> >> performance and building a special model which will be used in<br>
>> >> >>> >> certain<br>
>> >> >>> >> circumstances and on the one hand would look as close as<br>
>> >> >>> >> possible<br>
>> >> >>> >> to<br>
>> >> >>> >> the original, but on another hand allows achieve desired or<br>
>> >> >>> >> better<br>
>> >> >>> >> performance.<br>
>> >> >>> >> That what LOD actor does, crude models will be silently created<br>
>> >> >>> >> and<br>
>> >> >>> >> displayed during rotation or when actor is moved.<br>
>> >> >>> >><br>
>> >> >>> >> Now assume there are 2 model - lets say 1st is your unstructured<br>
>> >> >>> >> 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<br>
>> >> >>> >> 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<br>
>> >> >>> >> 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<br>
>> >> >>> >> 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<br>
>> >> >>> >> frame<br>
>> >> >>> >> rate.<br>
>> >> >>> >> From<br>
>> >> >>> >> <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.<br>
>> >> >>> >> This<br>
>> >> >>> >> then will cause vtkLODActor to adjust its LOD to fulfill the<br>
>> >> >>> >> requested<br>
>> >> >>> >> update rate.<br>
>> >> >>> >> For greater control on levels of detail, see also vtkLODProp3D.<br>
>> >> >>> >> 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<br>
>> >> >>> >> <<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<br>
>> >> >>> >> > were<br>
>> >> >>> >> > reduced<br>
>> >> >>> >> > from 6163542 to 373626 assuming grid has hexahedrons each with<br>
>> >> >>> >> > 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<br>
>> >> >>> >> > 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<br>
>> >> >>> >> > do/check<br>
>> >> >>> >> > something<br>
>> >> >>> >> > else?<br>
>> >> >>> >> ><br>
>> >> >>> >> > If you need something specific to answer more specifically, I<br>
>> >> >>> >> > 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<br>
>> >> >>> >> > from<br>
>> >> >>> >> > vtkDataSetSurfaceFilter with<br>
>> >> >>> >> > such in the unstructured grid,<br>
>> >> >>> >> > Even though it may be significantly decreased in some cases,<br>
>> >> >>> >> > for<br>
>> >> >>> >> > example if LOD actors are used,  they may decrease actually<br>
>> >> >>> >> > shown<br>
>> >> >>> >> > primitives during rotation approximately to the same number<br>
>> >> >>> >> > and<br>
>> >> >>> >> > 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<br>
>> >> >>> >> > <<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<br>
>> >> >>> >> >> 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<br>
>> >> >>> >> >> same<br>
>> >> >>> >> >> as<br>
>> >> >>> >> >> though I<br>
>> >> >>> >> >> rendered all cells in the unstructured grid.<br>
>> >> >>> >> >> The reason I chose to introduce rendering just surface cells<br>
>> >> >>> >> >> in<br>
>> >> >>> >> >> the<br>
>> >> >>> >> >> first<br>
>> >> >>> >> >> place was to make rendering faster. But I am surprised it<br>
>> >> >>> >> >> 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<br>
>> >> >>> >> >>> really<br>
>> >> >>> >> >>> only<br>
>> >> >>> >> >>> for performance reasons.<br>
>> >> >>> >> >>><br>
>> >> >>> >> >>> I was thinking if I rendered just surface cells, the<br>
>> >> >>> >> >>> rendering<br>
>> >> >>> >> >>> and<br>
>> >> >>> >> >>> rotation etc would be must faster.<br>
>> >> >>> >> >>> However I do not find it any different than when I render<br>
>> >> >>> >> >>> 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<br>
>> >> >>> >> >>>> then<br>
>> >> >>> >> >>>> retrieving<br>
>> >> >>> >> >>>> that using GetGlobalIds. Many thanks for your patience and<br>
>> >> >>> >> >>>> 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<br>
>> >> >>> >> >>>>> not<br>
>> >> >>> >> >>>>> defined<br>
>> >> >>> >> >>>>> in that version.<br>
>> >> >>> >> >>>>><br>
>> >> >>> >> >>>>> I get the error that SetOriginalCellIdsName is not a<br>
>> >> >>> >> >>>>> member<br>
>> >> >>> >> >>>>> 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>
>> >> >>> >> >>>>>><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<br>
>> >> >>> >> >>>>>>> to<br>
>> >> >>> >> >>>>>>> access<br>
>> >> >>> >> >>>>>>> the<br>
>> >> >>> >> >>>>>>> new Ids array after the fact.<br>
>> >> >>> >> >>>>>>> VTK Doc says something about a 'OrginalCellIds' but I am<br>
>> >> >>> >> >>>>>>> not<br>
>> >> >>> >> >>>>>>> sure<br>
>> >> >>> >> >>>>>>> how<br>
>> >> >>> >> >>>>>>> to access this.<br>
>> >> >>> >> >>>>>>> So I extracted the output of DSF to a vtkPolyData but<br>
>> >> >>> >> >>>>>>> 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<br>
>> >> >>> >> >>>>>>>> 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<br>
>> >> >>> >> >>>>>>>> the<br>
>> >> >>> >> >>>>>>>> fact<br>
>> >> >>> >> >>>>>>>> to<br>
>> >> >>> >> >>>>>>>> do the<br>
>> >> >>> >> >>>>>>>> lookups into the data that is input to the DSF and<br>
>> >> >>> >> >>>>>>>> extract<br>
>> >> >>> >> >>>>>>>> particular<br>
>> >> >>> >> >>>>>>>> cells/points by their offset (n'th cell in the cell<br>
>> >> >>> >> >>>>>>>> array,<br>
>> >> >>> >> >>>>>>>> n'th<br>
>> >> >>> >> >>>>>>>> point in the<br>
>> >> >>> >> >>>>>>>> point array)<br>
>> >> >>> >> >>>>>>>><br>
>> >> >>> >> >>>>>>>> However I still recommend making your own ids array and<br>
>> >> >>> >> >>>>>>>> using<br>
>> >> >>> >> >>>>>>>> that<br>
>> >> >>> >> >>>>>>>> instead of PassThrough. vtkIdFilter will generate them<br>
>> >> >>> >> >>>>>>>> for<br>
>> >> >>> >> >>>>>>>> you.<br>
>> >> >>> >> >>>>>>>> The<br>
>> >> >>> >> >>>>>>>> array<br>
>> >> >>> >> >>>>>>>> marked as the active global ids array is treated<br>
>> >> >>> >> >>>>>>>> specially<br>
>> >> >>> >> >>>>>>>> by<br>
>> >> >>> >> >>>>>>>> most<br>
>> >> >>> >> >>>>>>>> filters<br>
>> >> >>> >> >>>>>>>> in that they try to preserve it across operations<br>
>> >> >>> >> >>>>>>>> (including<br>
>> >> >>> >> >>>>>>>> threshold and<br>
>> >> >>> >> >>>>>>>> DSF). We added this to VTK a few years ago specifically<br>
>> >> >>> >> >>>>>>>> for<br>
>> >> >>> >> >>>>>>>> this<br>
>> >> >>> >> >>>>>>>> case of<br>
>> >> >>> >> >>>>>>>> finding out where particular result values come from<br>
>> >> >>> >> >>>>>>>> (and<br>
>> >> >>> >> >>>>>>>> in<br>
>> >> >>> >> >>>>>>>> particular for<br>
>> >> >>> >> >>>>>>>> surface selection). So the Threshold and surface filter<br>
>> >> >>> >> >>>>>>>> will<br>
>> >> >>> >> >>>>>>>> push<br>
>> >> >>> >> >>>>>>>> globalIDS<br>
>> >> >>> >> >>>>>>>> forward just fine. Once you get a result, grab the<br>
>> >> >>> >> >>>>>>>> active<br>
>> >> >>> >> >>>>>>>> globaIDs<br>
>> >> >>> >> >>>>>>>> array,<br>
>> >> >>> >> >>>>>>>> look for the values in it, and look them up in the<br>
>> >> >>> >> >>>>>>>> original<br>
>> >> >>> >> >>>>>>>> data.<br>
>> >> >>> >> >>>>>>>> The<br>
>> >> >>> >> >>>>>>>> extract selections filter will do the job of looking<br>
>> >> >>> >> >>>>>>>> them<br>
>> >> >>> >> >>>>>>>> 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<br>
>> >> >>> >> >>>>>>>>> an<br>
>> >> >>> >> >>>>>>>>> globalids<br>
>> >> >>> >> >>>>>>>>> array? Is that what the member is called - globalIds?<br>
>> >> >>> >> >>>>>>>>> I<br>
>> >> >>> >> >>>>>>>>> actually<br>
>> >> >>> >> >>>>>>>>> pass<br>
>> >> >>> >> >>>>>>>>> VTKUnstructuredgrid  to a VTKThreshold filter and then<br>
>> >> >>> >> >>>>>>>>> pass<br>
>> >> >>> >> >>>>>>>>> that<br>
>> >> >>> >> >>>>>>>>> filter to<br>
>> >> >>> >> >>>>>>>>> VTKdatasetsurfacefilter.<br>
>> >> >>> >> >>>>>>>>><br>
>> >> >>> >> >>>>>>>>> Perhaps you can post a couple lines of code. That<br>
>> >> >>> >> >>>>>>>>> would<br>
>> >> >>> >> >>>>>>>>> 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<br>
>> >> >>> >> >>>>>>>>>> containing<br>
>> >> >>> >> >>>>>>>>>> a<br>
>> >> >>> >> >>>>>>>>>> unique<br>
>> >> >>> >> >>>>>>>>>> value for each cell. If it does, extract will<br>
>> >> >>> >> >>>>>>>>>> preserve<br>
>> >> >>> >> >>>>>>>>>> it.<br>
>> >> >>> >> >>>>>>>>>> After<br>
>> >> >>> >> >>>>>>>>>> the<br>
>> >> >>> >> >>>>>>>>>> extraction, use that array in the polydata to do the<br>
>> >> >>> >> >>>>>>>>>> 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<br>
>> >> >>> >> >>>>>>>>>>> one<br>
>> >> >>> >> >>>>>>>>>>> of<br>
>> >> >>> >> >>>>>>>>>>> you<br>
>> >> >>> >> >>>>>>>>>>> guide me on how.<br>
>> >> >>> >> >>>>>>>>>>><br>
>> >> >>> >> >>>>>>>>>>> I use a vtkDataSetSurfaceFilter on<br>
>> >> >>> >> >>>>>>>>>>> VTKUnstructuredGrid<br>
>> >> >>> >> >>>>>>>>>>> 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>
>> >> >>> >> >>>>>>>>>>><br>
>> >> >>> >> >>>>>>>>>>> dataSetSurfaceFilter->GetOutput()->GetNumberOfCells().<br>
>> >> >>> >> >>>>>>>>>>><br>
>> >> >>> >> >>>>>>>>>>><br>
>> >> >>> >> >>>>>>>>>>> I need a way to map the surface back to the original<br>
>> >> >>> >> >>>>>>>>>>> cell<br>
>> >> >>> >> >>>>>>>>>>> id.<br>
>> >> >>> >> >>>>>>>>>>> That<br>
>> >> >>> >> >>>>>>>>>>> is if I have 2 cells and I render just skin, number<br>
>> >> >>> >> >>>>>>>>>>> of<br>
>> >> >>> >> >>>>>>>>>>> surfaces<br>
>> >> >>> >> >>>>>>>>>>> rendered are<br>
>> >> >>> >> >>>>>>>>>>> 10. I need to be able to pick on any of these 10<br>
>> >> >>> >> >>>>>>>>>>> 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<br>
>> >> >>> >> >>>>>>>>>>> polygonal<br>
>> >> >>> >> >>>>>>>>>>> dataset<br>
>> >> >>> >> >>>>>>>>>>> will have a celldata array that holds the cell index<br>
>> >> >>> >> >>>>>>>>>>> of<br>
>> >> >>> >> >>>>>>>>>>> the<br>
>> >> >>> >> >>>>>>>>>>> original 3D cell<br>
>> >> >>> >> >>>>>>>>>>> that produced each output cell. This is useful for<br>
>> >> >>> >> >>>>>>>>>>> cell<br>
>> >> >>> >> >>>>>>>>>>> picking.<br>
>> >> >>> >> >>>>>>>>>>> I turned the PassThroughCellIds On and I have<br>
>> >> >>> >> >>>>>>>>>>> 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<br>
>> >> >>> >> >>>>>>>>>>> array<br>
>> >> >>> >> >>>>>>>>>>> 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<br>
>> >> >>> >> >>>>>>>>>>> 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>
>> >> --<br>
>> >> Cory Quammen<br>
>> >> Research Associate<br>
>> >> Department of Computer Science<br>
>> >> The University of North Carolina at Chapel Hill<br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Cory Quammen<br>
>> Research Associate<br>
>> Department of Computer Science<br>
>> The University of North Carolina at Chapel Hill<br>
><br>
><br>
<br>
<br>
<br>
--<br>
Cory Quammen<br>
Research Associate<br>
Department of Computer Science<br>
The University of North Carolina at Chapel Hill<br>
</div></div></blockquote></div><br>