<div dir="ltr"><div>Hi Alexander,</div><div><br></div><div>I meant just vtkThreshold, by itself, before vtkDataSetMapper.  This will show only the points that are within the threshold.  In comparison, vtkImageThreshold does not remove points.  All it can do is change the color of the points.</div><div><br></div><div>However, what you do with vtkImageThreshold can also work, but you must always set a range for the lookup table, e.g. lookupTable.SetRange(0, 1000).</div><div><br></div><div> - David</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 18, 2017 at 8:40 AM, Alexander Mizuk <span dir="ltr"><<a href="mailto:amizuk@uni-osnabrueck.de" target="_blank">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">
  
    
  
  <div 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(<wbr>reader.GetOutputPort());<br>
                  threshold.ThresholdByLower(<wbr>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.<wbr>SetLookupTable(lookupTable);<br>
                  mapTransparency.SetInput(<wbr>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<span class="HOEnZb"><font color="#888888"><br>
    </font></span></p><span class="HOEnZb"><font color="#888888">
    <p>Alexander<br>
    </p></font></span><div><div class="h5">
    <br>
    <div class="m_8803710564891264070moz-cite-prefix">Am 18.09.2017 um 15:24 schrieb David
      Gobbi:<br>
    </div>
    <blockquote type="cite">
      <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">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>
  </div></div></div>

</blockquote></div><br></div></div>