[vtkusers] Change visibilty of datasets with zero value
David Gobbi
david.gobbi at gmail.com
Mon Sep 18 09:24:01 EDT 2017
Hi Alexander,
You can use vtkThreshold to set the threshold, or perhaps you can use a
lookup table that sets the opacity of those scalars to zero, i.e. use
table->SetTableValue(0, 0.0, 0.0, 0.0, 0.0).
- David
On Mon, Sep 18, 2017 at 2:22 AM, Alexander Mizuk <amizuk at uni-osnabrueck.de>
wrote:
> 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.RenderWin
> dow;
>
> vtkRenderer renderer = renderWindow.GetRenderers().Ge
> tFirstRenderer();
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170918/5df23811/attachment.html>
More information about the vtkusers
mailing list