[vtkusers] add threshold filter to a volume (mipviwer vtk java)

amal jerbi am.jerbi at gmail.com
Wed Jul 10 05:01:10 EDT 2013


I would like to add a threshold filter to the example of
http://gdcm.sourceforge.net/html/MIPViewer_8java-example.html I have add
this code but that show now thing!!!

vtkMeshQuality qualityFilter = new vtkMeshQuality();
qualityFilter.SetInputConnection(change.GetOutputPort());
qualityFilter.SetTriangleQualityMeasureToArea();
qualityFilter.Update();
tkDataSet qualityMesh = qualityFilter.GetOutput();
vtkThreshold selectCells = new vtkThreshold();
selectCells.ThresholdByLower(.1);
selectCells.SetInputArrayToProcess(0, 0, 0, "FIELD_ASSOCIATION_CELLS",
"vSCALARS");
selectCells.SetInput(qualityMesh);
selectCells.Update();
vtkUnstructuredGrid ug = selectCells.GetOutput();
mapper.SetInput(ug);

also, when i execute the java code of the mipviewer (without threshold
filter) i got the volume but whith an error :Extension GL_VERSION_1_2 could
not be loaded so, i test the exixtance of the version1.2 like that:

        vtkOpenGLExtensionManager extensions = new vtkOpenGLExtensionManager();
        extensions.SetRenderWindow(renWin);
        int etat = extensions.ExtensionSupported("GL_VERSION_1_2");
        System.out.println("version=" + etat);

i got 1 so the version 1.2 exist on my graphic card!!! any idea to solve
that maily the quality of the display is not good

thanks a lot AMAL.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130710/8e997c29/attachment.htm>


More information about the vtkusers mailing list