[vtkusers] Medical image display - color of image pixels outside an image volume sliced with vtkImageResliceMapper

Andrea Borsic aborsic at ne-scientific.com
Sun May 6 16:39:01 EDT 2018


Dear VTK users list:

I am reporting that the issue can be fixed by calling 
SeparateWindowLevelOperationOff() on the mapper.

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.

Best Regards,

Andrea


On 5/3/2018 11:54 PM, David Gobbi wrote:
> Hi Andrea,
>
> I've tried reproducing your problem with CTs on my own system, but so 
> far I haven't seen the grey border.
>
> Can you show me all of the settings that you use with 
> vtkImageResliceMapper and also all the settings for the vtkImageProperty?
>
> Also, can you tell me what version of VTK you are using? And whether 
> you're using the OpenGL backend or the OpenGL2 backend?
>
> And what your are using to read the DICOM images into your program 
> (ITK, vtkDICOMImageReader, vtk-dicom, GDCM, etc)?
>
>  - David
>
>
>
> On Thu, May 3, 2018 at 3:14 PM, Andrea Borsic 
> <aborsic at ne-scientific.com <mailto:aborsic at ne-scientific.com>> wrote:
>
>     Hi,
>
>     I have a question about the use of the vtkImageReslice mapper.
>
>     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.
>
>     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.
>
>     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 ....
>
>
>
>     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.
>
>     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.
>
>     Can anyone please advise on how to control such value - so that
>     gray borders could be eliminated?
>
>     Thanks in advance for any suggestion,
>
>     Best Regards,
>
>     Andrea
>
>

-- 
++++++++++++++++++++++++++++++++++++++
Andrea Borsic Ph.D.
Founder & CEO - NE Scientific LLC
web: http://www.ne-scientific.com/
twitter: https://twitter.com/NE_Scientific
phone: +1 603 676 7450

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180506/c2d10891/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dikmnalkeelkenoa.png
Type: image/png
Size: 377747 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180506/c2d10891/attachment-0001.png>


More information about the vtkusers mailing list