<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Dear VTK users list:</p>
    <p>I am reporting that the issue can be fixed by calling
      SeparateWindowLevelOperationOff() on the mapper.</p>
    <p>This solution was learned from an off-line conversation with
      David Gobbi. The conversation was off-line as I could not provide
      publicly sharable code, due to privacy considerations related to
      medical data-sets.</p>
    <p>Best Regards,</p>
    <p>Andrea<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 5/3/2018 11:54 PM, David Gobbi
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANwS1=H==1f_sohwqFF56WAHqbeLTygE4UpGOy2sO1gVQvTrWA@mail.gmail.com">
      <div dir="ltr">
        <div>Hi Andrea,</div>
        <div><br>
        </div>
        <div>I've tried reproducing your problem with CTs on my own
          system, but so far I haven't seen the grey border.</div>
        <div><br>
        </div>
        <div>Can you show me all of the settings that you use with
          vtkImageResliceMapper and also all the settings for the
          vtkImageProperty?</div>
        <div><br>
        </div>
        <div>Also, can you tell me what version of VTK you are using? 
          And whether you're using the OpenGL backend or the OpenGL2
          backend?</div>
        <div><br>
        </div>
        <div>And what your are using to read the DICOM images into your
          program (ITK, vtkDICOMImageReader, vtk-dicom, GDCM, etc)?</div>
        <div><br>
        </div>
        <div> - David</div>
        <div><br>
        </div>
        <br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Thu, May 3, 2018 at 3:14 PM,
            Andrea Borsic <span dir="ltr"><<a
                href="mailto:aborsic@ne-scientific.com" target="_blank"
                moz-do-not-send="true">aborsic@ne-scientific.com</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"> Hi,<br>
                <br>
                I have a question about the use of the vtkImageReslice
                mapper.<br>
                <br>
                In setting up a VTK pipeline for displaying CT image
                slices we used previously a vtkImageReslice followed by
                a vtkImageMapToColors. We have recently switched to
                using a vtkImageResliceMapper instead of the two
                previous classes, but we are experiencing an issue.<br>
                <br>
                When using vtkImageReslice the method
                SetBackgroundLevel() was called with a value of -1000
                which mapped pixels falling outside the sampled CT
                volume to a black pixel on screen, given the LUT in use.<br>
                <br>
                In vtkImageResliceMapper the conversion from CT scalar
                values to screen colors is performed internally and we
                have tried playing with BackgroundOn() and with
                SetBackingColor of a vtkImagePorperty is passed to the
                vtkImageResliceMapper, but we are not able to get rid of
                a thin gray border that at times shows around the image
                as shown in the screenshot below ....<br>
                <br>
                <img src="cid:part2.65752F8F.56B7DC13@ne-scientific.com"
                  alt="" class=""><br>
                <br>
                Additionally, when the slicing plane is set at the very
                beginning of the volume or at the very end, the output
                is a slice which is completely gray.<br>
                <br>
                I suspect that pixel values for sampling locations that
                fall outside of the CT image volume are set to a default
                value which results in the gray pixels.<br>
                <br>
                Can anyone please advise on how to control such value -
                so that gray borders could be eliminated?<br>
                <br>
                Thanks in advance for any suggestion,<br>
                <br>
                Best Regards,<br>
                <br>
                Andrea<br>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
++++++++++++++++++++++++++++++++++++++
Andrea Borsic Ph.D.
Founder & CEO - NE Scientific LLC
web: <a class="moz-txt-link-freetext" href="http://www.ne-scientific.com/">http://www.ne-scientific.com/</a>
twitter: <a class="moz-txt-link-freetext" href="https://twitter.com/NE_Scientific">https://twitter.com/NE_Scientific</a>
phone: +1 603 676 7450</pre>
  </body>
</html>