[vtkusers] (no subject)

Denis Shamonin dshamoni at science.uva.nl
Mon May 19 09:05:58 EDT 2003


Rainbow, Michael wrote:

>Hello,
>	I am new to Vtk C++ user.  I am trying to read in 3D POS data of
>about 15 or so individual targets, represent each target as sphere with a
>label, and interact with the rendering window to draw lines between each
>sphere.  If someone could get me started in the right direction, especially
>with the multiple sphere creation and interaction part, I would greatly
>appreciate it.
>	
>Thanks,
>  
>
<cid:part1.09010406.06000304 at science.uva.nl>

vtkSphereSource *sphere = vtkSphereSource::New(); 

vtkGlyph3D *glyph = vtkGlyph3D::New();
   glyph->SetInput(YourImageData); // vtkImageData - data array
   glyph->SetSource(sphere->GetOutput());
   glyph->SetScaleFactor(1);
    
vtkPolyDataMapper *Mapper = vtkPolyDataMapper::New();
   Mapper->SetInput(glyph->GetOutput());
    
vtkActor *Actor = vtkActor::New();
   Actor->SetMapper(Mapper);

-- 
Denis Shamonin





More information about the vtkusers mailing list