[vtkusers] Deprecated isosurface extraction in VTK 8 with OpenGL2 support

lucky f_u_7 at yahoo.com
Tue Jul 3 06:57:53 EDT 2018


I can perform ray cast isosurface extraction using the following method in
VTK <= 8.0.1 with Legacy OpenGL support. I can visualize the extracted
surface without any issue, everything works perfect.

Now I want to port the same code with VTK 8.1.1 OpenGL2 (3.2) support. In
this version both vtkVolumeRayCastIsosurfaceFunction and
vtkVolumeRayCastMapper classes are deprecated. I have tried vtkContourFilter
instead of using these classes but never worked. How can I achieve the same
output using the new GPU mapper vtkOpenGLGPUVolumeRayCastMapper or
vtkFixedPointVolumeRayCastMapper? 

    void IsoExtraction::create(double _iso, vtkImageData* _data)
    {	
    p_iso_surf_func = vtkVolumeRayCastIsosurfaceFunction::New();
    p_iso_surf_func->SetIsoValue(_iso);
    
    	
    p_mapper = vtkVolumeRayCastMapper::New();
    p_mapper->SetVolumeRayCastFunction(p_iso_surf_func);	// Set volume ray
cast function
    p_mapper->SetInputData(_data);
    
    // … addToLOD (p_mapper) 
    // …
    }
    void IsoExtraction::setIsoValue(double _iso)
    {
    	p_iso_surf_func->SetIsoValue(_iso);
    }



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list