Forgot to attach!<br><br><div class="gmail_quote">On Mon, Oct 5, 2009 at 11:03 AM, da <span dir="ltr"><<a href="mailto:remywendy@gmail.com">remywendy@gmail.com</a>></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'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't display at all on Paraview). In my application, after passing through a vtkStructuredGridGeometryFilter and
vtkDataSetMapper, the
vtkActor->GetProperty()->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'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<3;a++){<br>
if (dim[a]==1)<br>
counter_oneD++;<br>
}<br>
if (counter_oneD==2) <br>
{<br>
vtkPolyData *polyData = vtkPolyData::New();<br>
polyData->SetPoints(points);<br>
vtkCellArray *carray = vtkCellArray::New();<br>
for (int a=0; a<ntemp; a++)<br>
{<br>
carray->InsertNextCell(1, &a);<br>
}<br>
polyData->SetVerts(carray);<br>
vtkPolyDataMapper *polyMapper = vtkPolyDataMapper::New();<br>
polyMapper->SetInput(polyData);<br>
<br>
// need to make member...<br>
if (!m_ActorFix)<br>
m_ActorFix = vtkActor::New();<br>
m_ActorFix->GetProperty()->SetRepresentation(this->m_Representation);<br>
m_ActorFix->GetProperty()->SetPointSize(this->m_PointSize);<br>
m_ActorFix->GetProperty()->SetColor(this->m_Color[0], this->m_Color[1], this->m_Color[2]);<br>
m_ActorFix->SetMapper(polyMapper);<br>
renderer->AddActor(m_ActorFix);<br>
}
</blockquote></div><br>