I believe I&#39;ve got this figured out.<br><br>On rendering a PolyData and changing the representation in vtkActor()&#39;s vtkProperty, Lines and Vertices are always going to be displayed regardless of the representation (wireframe, point, surface). However, if its Polygon, changing the representation to wireframe will render the wireframe of the bounded polygons, while Point will display the Vertices that make up the polygon (even if there are no vertices defined in the PolyData). <br>
<br>Because a (x,y=1,z=1) structured grid only produced Lines in PolyData, that was all that showed up and changing the vtkProperty representation to Points doesn&#39;t change anything.<br><br>Here is the legacy file I played around with in Paraview to understand this.<br>
<br># vtk DataFile Version 1.0<br>Grid Example<br>ASCII<br>DATASET POLYDATA<br>POINTS 27 float<br>0.0 0.0 0.0<br>1.0 0.0 0.0<br>2.0 0.0 0.0<br>0.0 1.0 0.0<br>1.0 1.0 0.0<br>2.0 1.0 0.0<br>0.0 0.0 1.0<br>1.0 0.0 1.0<br>2.0 0.0 1.0<br>
0.0 1.0 1.0<br>1.0 1.0 1.0<br>2.0 1.0 1.0<br>0.0 1.0 2.0<br>1.0 1.0 2.0<br>2.0 1.0 2.0<br>0.0 1.0 3.0<br>1.0 1.0 3.0<br>2.0 1.0 3.0<br>0.0 1.0 4.0<br>1.0 1.0 4.0<br>2.0 1.0 4.0<br>0.0 1.0 5.0<br>1.0 1.0 5.0<br>2.0 1.0 5.0<br>
0.0 1.0 6.0<br>1.0 1.0 6.0<br>2.0 1.0 6.0<br><br>VERTICES 5 10<br>1 16<br>1 17<br>1 18<br>1 19<br>1 20<br><br>LINES 27 81<br>2 0 1<br>2 1 2<br>2 2 3<br>2 3 4<br>2 4 5<br>2 5 6<br>2 6 7<br>2 7 8<br>2 8 9<br>2 9 10<br>2 10 11<br>
2 11 12<br>2 12 13<br>2 13 14 <br>2 14 15<br>2 15 16<br>2 16 17<br>2 17 18<br>2 18 19<br>2 19 20<br>2 20 21<br>2 21 22<br>2 22 23<br>2 23 24<br>2 24 25<br>2 25 26<br>2 26 0<br><br>POLYGONS 2 10<br>4 0 1 2 3<br>4 6 7 8 1<br>
<br><br><div class="gmail_quote">On Mon, Oct 5, 2009 at 11:03 AM, da <span dir="ltr">&lt;<a href="mailto:remywendy@gmail.com">remywendy@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
I posted this problem a few months back, and still haven&#39;t been able to figure this out so I figured I would try again on the mailing list.<br>
<br>
The problem is that vtkStructuredGrid dimensions of (x,y=1,z=1) or
(x, y=1) do not seem to display correctly (and doesn&#39;t display at all on Paraview). In my application, after passing through a vtkStructuredGridGeometryFilter and
vtkDataSetMapper, the
vtkActor-&gt;GetProperty()-&gt;SetRepresentationTo(xxx) no longer
works; I cannot see points or surface or wireframe (it always shows an
outline, which is the same as what it would look like in wireframe).<br>
<br>
Attached is a (x,y=1,z=1) plot3d file that you can open up with Paraview to see the problem. (options= unselect everything, not binary or any other option).<br>
<br>
Because a vtkStructuredGrid with (x,y,z=1) displays fine, I&#39;m guessing this has to do with the structured grid having ncells =
npoints-1, and the cells types are all lines; somehow its not being mapped or
rendered correctly? Or am I not implementing the correct pipeline after
vtkStructuredGridGeometryFilter? <br>
<br><br><br>
Currently, what I do when I read a structured grid with dimensions of
(x,y=1,z=1) or (x, y=1), I manually convert the vtkStructuredGrid to a
vtkPolyData with the following, just so it displays correctly. However, I want to get rid of this and fix the core of the problem. Any ideas appreciated.<br>
<br>
    int counter_oneD = 0;<br>
    for (int a=0; a&lt;3;a++){<br>
        if (dim[a]==1)<br>
            counter_oneD++;<br>
    }<br>
    if (counter_oneD==2) <br>
    {<br>
        vtkPolyData *polyData = vtkPolyData::New();<br>
        polyData-&gt;SetPoints(points);<br>
        vtkCellArray *carray = vtkCellArray::New();<br>
        for (int a=0; a&lt;ntemp; a++)<br>
        {<br>
            carray-&gt;InsertNextCell(1, &amp;a);<br>
        }<br>
        polyData-&gt;SetVerts(carray);<br>
        vtkPolyDataMapper *polyMapper = vtkPolyDataMapper::New();<br>
        polyMapper-&gt;SetInput(polyData);<br>
<br>
        // need to make member...<br>
        if (!m_ActorFix)<br>
            m_ActorFix = vtkActor::New();<br>
        m_ActorFix-&gt;GetProperty()-&gt;SetRepresentation(this-&gt;m_Representation);<br>
        m_ActorFix-&gt;GetProperty()-&gt;SetPointSize(this-&gt;m_PointSize);<br>
        m_ActorFix-&gt;GetProperty()-&gt;SetColor(this-&gt;m_Color[0], this-&gt;m_Color[1], this-&gt;m_Color[2]);<br>
        m_ActorFix-&gt;SetMapper(polyMapper);<br>
        renderer-&gt;AddActor(m_ActorFix);<br>
    }
</blockquote></div><br>