<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi David,<br>
    </p>
    <p>Thank you for the information about vtkImageThreshold. <br>
      If I use vtkThreshold then I get always the following error: <br>
      vtkFloatArray (09B0E400): Unable to allocate 348585984 elements of
      size 4 bytes. <br>
      I think this happens cause of my dataset is to big? <br>
    </p>
    <p>            vtkThreshold th = vtkThreshold.New();<br>
                  th.SetInputConnection(reader.GetOutputPort());<br>
                  th.ThresholdByUpper(500);<br>
                  th.Update();</p>
    <p>This is how you recommend it, right?<br>
    </p>
    <p>And when I use lookupTable.SetRange(0, 1000) without using
      vtkImageThreshold then it change my view and I can display
      different parts but I still get for my result a big black cube
      with some details in it. But I don't need this cube, just the
      contours in it. </p>
    <p>Maybe I use the wrong type for this. My Input looks like this <br>
       vtkDICOMImageReader reader = new
      Kitware.VTK.vtkDICOMImageReader();<br>
      <br>
      Is vtkDatasetMapper the right mapper for displaying the points?
      Cause I think this render just the outer contours and left the
      inside empty. Because of this the lookupTable is not able to set
      the visibilty of the back area off. <br>
      Is that possible?<br>
      <br>
      best regards<br>
      Alexander<br>
    </p>
    <br>
    <div class="moz-cite-prefix">Am 18.09.2017 um 22:13 schrieb David
      Gobbi:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANwS1=EFikwGn3vHTxXfi0OCtddhAgZQgktLTSOx7+1WKnmrgA@mail.gmail.com">
      <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"
                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">
              <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" 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>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>