<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi David, <br>
<br>
thank you for your fast respond. <br>
I used the following code:</p>
<p> vtkImageThreshold threshold =
vtkImageThreshold.New();<br>
threshold.SetInputConnection(reader.GetOutputPort());<br>
threshold.ThresholdByLower(500);<br>
threshold.ReplaceInOn();<br>
threshold.SetInValue(0);<br>
threshold.ReplaceOutOn();<br>
threshold.SetOutValue(1);<br>
threshold.Update();<br>
<br>
vtkLookupTable lookupTable = vtkLookupTable.New();<br>
lookupTable.SetTableValue(0, 0.0, 0.0, 0.0, 0.0);<br>
lookupTable.Build();<br>
<br>
vtkImageMapToColors mapTransparency =
vtkImageMapToColors.New();<br>
mapTransparency.SetLookupTable(lookupTable);<br>
mapTransparency.SetInput(threshold.GetOutput());</p>
<p>and send then the mapTransparency to the mapper. My result is
still a black cube with a white contour in it. But I just want to
display the white contour. <br>
</p>
<p>Is it possible to display only a specific part of a dataset or
have I always to render everything?<br>
</p>
<p>Thank you for your help<br>
</p>
<p>Alexander<br>
</p>
<br>
<div class="moz-cite-prefix">Am 18.09.2017 um 15:24 schrieb David
Gobbi:<br>
</div>
<blockquote type="cite"
cite="mid:CANwS1=EEzbyJKkjRTZc3x0iPbAia+6BEtb8SCVPZ6zpnVqSsVA@mail.gmail.com">
<div dir="ltr">
<div>Hi Alexander,</div>
<div><br>
</div>
<div>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).</div>
<div><br>
</div>
- David<br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Sep 18, 2017 at 2:22 AM,
Alexander Mizuk <span dir="ltr"><<a
href="mailto:amizuk@uni-osnabrueck.de" target="_blank"
moz-do-not-send="true">amizuk@uni-osnabrueck.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
there,<br>
<br>
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.<br>
Now I can display the hole dataset with:<br>
<br>
// Visualize<br>
vtkDataSetMapper mapper =
vtkDataSetMapper.New();<br>
mapper.SetInputConnection(shif<wbr>tScaleFilter.GetOutputPort());<br>
//mapper.ScalarVisibilityOff()<wbr>;<br>
<br>
vtkActor actor = vtkActor.New();<br>
actor.SetMapper(mapper);<br>
<br>
actor.GetProperty().SetPointSi<wbr>ze(4);<br>
vtkRenderWindow renderWindow =
renderWindowControl1.RenderWin<wbr>dow;<br>
<br>
vtkRenderer renderer =
renderWindow.GetRenderers().Ge<wbr>tFirstRenderer();<br>
<br>
renderer.SetBackground(0.2, 0.3, 0.4);<br>
renderer.AddActor(actor);<br>
<br>
renderer.ResetCamera();<br>
<br>
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.<br>
How can I realize it?<br>
<br>
best regards<br>
<br>
Alexander<br>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>