[vtkusers] My point cloud data won't display in the renderer.
Bill Lorensen
bill.lorensen at gmail.com
Tue Jul 9 12:10:24 EDT 2013
A vtkPoint is a geometric location. You need cells to visualize your data.
in your case, you need Vert's, one for each Point. An easy way to create
the verts is to use vtkVertexGlyphFilter.
See for example:
http://vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadTextFile
http://vtk.org/Wiki/VTK/Examples/Cxx/Filtering/VertexGlyphFilter
On Tue, Jul 9, 2013 at 11:46 AM, Ruff <albin.nilsson at gmail.com> wrote:
> All i get is an empty renderWindow. I get no errors, but no data is
> rendered
> either. What am I doing wrong?
>
> What I do is pretty much this:
>
> AtomGrid=vtk.vtkUnstructuredGrid()
> AtomGrid.SetPoints( vtkPoints with [index,x,y,z] )
> AtomGrid.GetPointData().SetScalars( vtkFloatArray with [index, scalar]
> )
>
> volMapper = vtk.vtkUnstructuredGridVolumeRayCastMapper()
> volMapper.SetBlendModeToComposite()
> volMapper.SetInput(AtomGrid)
>
>
> I tried volMapper.SetScalarModeToUsePointFieldData(), but then it claims
> that I have no scalar values to use(!!)
>
> (I cheated before, and was satisfied using ImageData for this, but now I
> really need to get this to work with UnstructuredGrid)
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/My-point-cloud-data-won-t-display-in-the-renderer-tp5721844.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130709/0b18f194/attachment.htm>
More information about the vtkusers
mailing list