[vtkusers] Change visibilty of datasets with zero value

Alexander Mizuk amizuk at uni-osnabrueck.de
Mon Sep 18 04:22:21 EDT 2017


Hi there,

I want to display a 3D point-cloud. If read a DICOM series with 
vtkDICOMImageReader, set a threshold and change the value range from HU 
to 255 bit grayscale.
Now I can display the hole dataset with:

              // Visualize
             vtkDataSetMapper mapper = vtkDataSetMapper.New();
mapper.SetInputConnection(shiftScaleFilter.GetOutputPort());
             //mapper.ScalarVisibilityOff();

             vtkActor actor = vtkActor.New();
             actor.SetMapper(mapper);

             actor.GetProperty().SetPointSize(4);
             vtkRenderWindow renderWindow = 
renderWindowControl1.RenderWindow;

             vtkRenderer renderer = 
renderWindow.GetRenderers().GetFirstRenderer();

             renderer.SetBackground(0.2, 0.3, 0.4);
             renderer.AddActor(actor);

             renderer.ResetCamera();

With mapper.ScalarVisibilityOff(); I can set the visibility of the hole 
dataset of, but I only want to set the visibiliy for voxels with a value 
under a specific threshold for example all voxel with the value of zero.
How can I realize it?

best regards

Alexander




More information about the vtkusers mailing list