[vtkusers] Splatting Question

Hao Wang haow at cs.utah.edu
Sat Jun 2 18:49:20 EDT 2007


I'm trying to do splatting in VTK. I generate the point set using 
vtkProgrammableSource, then I pass them onto vtkPolyDataNormals and then I 
use vtkGaussianSplatter (and mapper, actor, etc.). Somehow no matter how I 
change the eccentricity of the splatts (SetEccentricity method), my 
splatts remain being spheres. Any idea what might be wrong? The normals 
are not computed correctly?

========= The Code Snippet ========
vtkProgrammableSource pointSource
pointSource SetExecuteMethod genPoints

proc genPoints {} {

   set output [pointSource GetPolyDataOutput]
   vtkPoints points
   $output SetPoints points

   set infile [open "data.txt" r]

   while { [gets $infile line] >= 0 } {
       set nums [split $line " "]
       points InsertNextPoint [lindex $nums 0] [lindex $nums 1] [lindex 
$nums 2]
   }

   close $infile
   points Delete;
}

vtkPolyDataNormals normals
normals SetInputConnection [pointSource GetOutputPort]
normals ComputePointNormalsOn

vtkGaussianSplatter popSplatter
popSplatter SetInputConnection [normals GetOutputPort]
popSplatter SetSampleDimensions 300 300 300
popSplatter SetEccentricity 2.5
popSplatter NormalWarpingOn
popSplatter SetScaleFactor 1.0
popSplatter SetRadius 0.01 



More information about the vtkusers mailing list