[vtkusers] Is it surface/volume rendering for VE?

Andres Barrera andresba at hotmail.com
Tue Dec 21 12:01:32 EST 2004

Hi Mohamed,

      I haven't tried to get exactly what you want, but you can enhance your 
visualization (if you want to use surface rendering) with setting some actor 
properties such as:
smoothActor->SetMapper( parisonMapper);

       Actor->GetProperty()->SetDiffuse (...);

Also, by using 'vtkPolyDataNormals', your surfaces will look smoother.


PS: here's some code you can use to start playing with (at your own risk! :D 

void openSmoothSTLActor(char * fileName, vtkActor* smoothActor)
    vtkSTLReader  * sr = vtkSTLReader::New();
      sr->SetFileName( fileName );

    vtkGeometryFilter  *geom         = vtkGeometryFilter::New();
       geom->SetInput( sr->GetOutput() );

    vtkPolyDataNormals *Normals = vtkPolyDataNormals::New();
       Normals->SetInput       ( geom->GetOutput() );
       Normals->SetFeatureAngle( 100 );

    vtkLookupTable     *lut          = vtkLookupTable::New();
       lut->SetHueRange( 0.0, 0.66667);

    vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
       parisonMapper->SetInput      ( Normals->GetOutput() );
       parisonMapper->SetLookupTable( lut );
       parisonMapper->SetScalarRange( 0.12, 1.0 );

    if (smoothActor == NULL)
        smoothActor  = vtkActor::New();

       smoothActor->SetMapper( mapper );

smoothActor->GetProperty()->GetColor() );

    // clean up ...
    sr              ->Delete();
    geom            ->Delete();
    Normals         ->Delete();
    lut             ->Delete();
    mapper ->Delete();

>Dear VtkUsers,
>I need to visualize the internal views of hollow organs. I tried both 
>surface and volume rendering of vtk. However, i never get the output 
>provided by commercial packages such as
>My questions are, if you already saw that website.
>1. Are they using surface/volume rendering (I believe surface!)
>2. How to achieve that quality using vtk. Is it a light problem, or 
>rendering technique one.
>I do not think it is my graphic card problem because i have "nvidia Quadro 
>FX 3000. "
>thanks for your help.
>Mohamed Sabry Mohamed
>Medical Imaging Research Assistant
>University of Louisville
>Kentucky, USA.
>msabry at cairo.spd.louisville.edu
>Express yourself instantly with MSN Messenger! Download today it's FREE! 
>This is the private VTK discussion list. Please keep messages on-topic. 
>Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list