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

Chao Liang chaolian at mtu.edu
Mon Aug 19 13:51:37 EDT 2013


> 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 --------------
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/8b879254/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/8b879254/attachment-0001.png>


More information about the vtkusers mailing list