Forgot to attach!<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>