[vtkusers] colormapping

Schluperman Schluperman schluperman at gmx.de
Mon Oct 17 05:59:20 EDT 2005


Hi I need some help for collormapping
I have an array with Points(12600*3 named “profile”)which is generated by a
laser Scan of a
human back. In every Point of the back Surface i have calculated the
curvature which is represented by my other Array(12600*1). Now i want to
colormap the curvature values on the points. Where can I put my curvature
Array? So this is what I did..´maybe someone can help me , thanks 
.

vtkPolyData *profile=vtkPolyData::New();
    profile-> SetPoints (points);

vtkLookupTable *lut=vtkLookupTable::New();
vtkPolyDataMapper* mapMesh=vtkPolyDataMapper::New();
    mapMesh-> SetLookupTable (lut);
        mapMesh-> SetInput (profile);
    
vtkActor* meshActor=vtkActor::New();
       meshActor-> SetMapper (mapMesh);
       meshActor-> GetProperty()-> SetColor( 1 ,1 ,1);

vtkSphereSource *ball=vtkSphereSource::New();
    ball-> SetRadius (0.0018);
    ball-> SetThetaResolution (12);
    ball-> SetPhiResolution (12);
vtkGlyph3D *balls=vtkGlyph3D::New();
    balls-> SetInput (profile);
    balls-> SetSource (ball-> GetOutput());
vtkPolyDataMapper *mapBalls=vtkPolyDataMapper::New();
    mapBalls-> SetInput(balls-> GetOutput());
vtkActor *ballActor=vtkActor::New();
    ballActor-> SetMapper (mapBalls);
    ballActor-> GetProperty() -> SetColor (0.81, 0.59, 0.39);
    ballActor-> GetProperty() -> SetSpecularColor (1, 1, 1);
    ballActor-> GetProperty() -> SetSpecular (0.3);
    ballActor-> GetProperty() -> SetSpecularPower (20);
    ballActor-> GetProperty() -> SetAmbient (0.2);
    ballActor-> GetProperty() -> SetDiffuse (0.8);

vtkRenderer *ren1=vtkRenderer::New();
vtkRenderWindow *renWin=vtkRenderWindow::New();
    renWin ->AddRenderer (ren1);
vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New();
    iren-> SetRenderWindow (renWin);



..

-- 
NEU: Telefon-Flatrate fürs dt. Festnetz! GMX Phone_Flat: 9,99 Euro/Mon.*
Für DSL-Nutzer. Ohne Providerwechsel! http://www.gmx.net/de/go/telefonie



More information about the vtkusers mailing list