[vtkusers] Fwd: Strange Issue in VTK 6.0: Points Data Gone

Chao Liang chaolian at mtu.edu
Mon Aug 19 14:57:21 EDT 2013


Sorry, forgot to mention that: After my pipeline renders, my points/data is
gone.
Thanks in advance for any help or comments.

> I am doing upgrading our software from vtk 5.7 to vtk 6.0. But here is
> a very strange problem. Exactly the same code works in vtk 5.7 but not
> in vtk 6.0.
>
> The code is the following:
> -----------------------------------
> std::cout << "before drawing pipeline: mb size: " <<
> mb->GetNumberOfBlocks() << "pts: " << mb->GetNumberOfPoints() <<
> std::endl;
>   vtkPointSet *ps = vtkPointSet::SafeDownCast(mb->GetBlock(0));
>   std::cout << "__1 mb: " << mb << "ps: " << ps << " mb size: " <<
> mb->GetNumberOfBlocks() << " pts pts:" << ps->GetNumberOfPoints() <<
> std::endl;
>
>       {       // Drawing pipeline
>               m_Mapper = vtkPolyDataMapper::New();
>               m_Renderer->AddActor(m_Actor);
>               vtkCompositeDataGeometryFilter *sgfilter =
> vtkCompositeDataGeometryFilter::New();
>               sgfilter->SetInputData(mb);
>
>               m_Mapper->ScalarVisibilityOff();
>               m_Mapper->SetInputConnection(0, sgfilter->GetOutputPort());
>
>               m_Actor->GetProperty()->SetRepresentation(1);
>               m_Actor->GetProperty()->SetColor(.7,.7,.7);
>               m_Actor->SetMapper(m_Mapper);
>
>     m_Renderer->GetRenderWindow()->Render();
>
>               //sgfilter->Delete();
>               //m_Mapper->Delete();
>               //m_Actor->Delete();
>
>
>       }
>   std::cout << "after drawing pipeline: mb size: " <<
> mb->GetNumberOfBlocks() << "pts: " << mb->GetNumberOfPoints() <<
> std::endl;
>   std::cout << "__2 mb: " << mb << "ps: " << ps << " mb size: " <<
> mb->GetNumberOfBlocks() << " pts pts:" << ps->GetNumberOfPoints() <<
> std::endl;
>
---------------------------------------------------------------------------------------------------------------------
>
> This code, when work in vtk 5.7, we can successfully read in plot3D
> and tecplot files;
> but when in vtk 6.0, we only can successfully read in tecplot file,
> when read in plot3D file, the points data is gone. Please see attached
> print screen shot.
>
> I really don't know what is going on here, why the points data is
> gone? It is very strange.
>
> Any help is appreciated and thanks in advance.
>
> Chao
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130819/017e8e5f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot3d.png
Type: image/png
Size: 12597 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130819/017e8e5f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tecplot.png
Type: image/png
Size: 12631 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130819/017e8e5f/attachment-0001.png>


More information about the vtkusers mailing list