# Slice view not showing images?

**URL:** <https://discourse.slicer.org/t/slice-view-not-showing-images/14309>\
**Category:** Development\
**Created:** [October 29, 2020, 5:11pm UTC](https://discourse.slicer.org/t/slice-view-not-showing-images/14309 "2020-10-29T17:11:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamrankin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/adamrankin/32/155_2.png) [@adamrankin](https://discourse.slicer.org/u/adamrankin)\
**Post date:** [October 29, 2020, 5:11pm UTC](https://discourse.slicer.org/t/slice-view-not-showing-images/14309/1 "2020-10-29T17:11:37Z")

</div>

Hello,

In recent Slicer builds, images are not showing up in the slice view. The data probe shows correct pixel data, but the slice view is all black.

Has anyone else experienced this?

Adam

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [October 29, 2020, 5:23pm UTC](https://discourse.slicer.org/t/slice-view-not-showing-images/14309/2 "2020-10-29T17:23:29Z")

</div>

It is the top open issue. See

> <https://github.com/Slicer/Slicer/issues/5220>
>
> Working on the slice view issue, here are some results.
> 
> Below are the \*\*Resul…ts\*\* obtained after running the \*\*Test1\*\* and \*\*Test2\*\* in two builds of Slicer, One with VTK8 and one with VTK9.
> 
> \* VTK8: Slicer/Slicer@d52af6b303
> \* VTK9: This PR at https://github.com/Slicer/Slicer/pull/5141/commits/47672a73f6442205083b7ede0cd34696b92d652a
> 
> \# Results
> 
> \## Summary
> 
> | | VTK 8 | VTK 9 |
> |---|----|---|
> | Test1| :heavy\_check\_mark: | :heavy\_check\_mark: |
> | Test2| :heavy\_check\_mark: | :x: |
> 
> I suspect the problem is related to the use of \[vtkLightBoxRendererManager\](https://github.com/commontk/CTK/blob/support-build-with-vtk89/Libs/Visualization/VTK/Core/vtkLightBoxRendererManager.h) in \[ctkVTKSliceView\](https://github.com/commontk/CTK/blob/support-build-with-vtk89/Libs/Visualization/VTK/Widgets/ctkVTKSliceView.h)
> 
> 
> \## Outputs
> 
> | | VTK 8 | VTK 9 |
> |---|----|---|
> | Test1| !\[image\](https://user-images.githubusercontent.com/219043/92126306-04ee6680-edce-11ea-8b9d-da5024824099.png) | !\[image\](https://user-images.githubusercontent.com/219043/92126424-28b1ac80-edce-11ea-955e-a5bd7ea0765f.png) |
> | Test2| !\[image\](https://user-images.githubusercontent.com/219043/92126511-44b54e00-edce-11ea-8f5b-3c4ed85c6ebc.png) | !\[image\](https://user-images.githubusercontent.com/219043/92126607-631b4980-edce-11ea-9a48-a796af2e335f.png) |
> 
> 
> 
> 
> 
> \# Tests
> 
> \## Test1: Visualize slice pipeline output using vtkDataSetMapper/vtkRenderer/vtkRenderWindow
> 
> \`\`\`python
> import vtk
> import SampleData
> 
> SampleData.downloadSample("MRHead")
> 
> sliceLogic = slicer.app.layoutManager().sliceWidget("Red").sliceLogic()
> imageData = sliceLogic.GetImageDataConnection().GetProducer().GetOutputDataObject(0)
> 
> mapper = vtk.vtkDataSetMapper()
> 
> actor = vtk.vtkActor()
> actor.SetMapper(mapper)
> 
> ren = vtk.vtkRenderer()
> renWin = vtk.vtkRenderWindow()
> renWin.AddRenderer(ren)
> iren = vtk.vtkRenderWindowInteractor()
> iren.SetRenderWindow(renWin)
> 
> ren.AddActor(actor)
> 
> renWin.SetSize(300,300)
> 
> mapper.SetInputData(imageData)
> renWin.Render()
> \`\`\`
> 
> \## Test2: Visualize slice pipeline output using ctkSliceView
> 
> \`\`\`python
> import ctk
> import SampleData
> 
> SampleData.downloadSample("MRHead")
> 
> sliceLogic = slicer.app.layoutManager().sliceWidget("Red").sliceLogic()
> imageDataConnection = sliceLogic.GetImageDataConnection()
> 
> sliceView = ctk.ctkVTKSliceView()
> sliceView.setImageDataConnection(imageDataConnection)
> sliceView.show()
> sliceView.forceRender()
> \`\`\`
> 
> \_Originally posted by @jcfr in https://github.com/Slicer/Slicer/pull/5141#issuecomment-686523379\_

> [@Only black image shown in red/green/yellow view](https://discourse.slicer.org/t/only-black-image-shown-in-red-green-yellow-view/14267/2):
>
> I tried some different versions of 3D Slicer: r29407: only black slices in the red/green/yellow views r29402: everything works fine So the problem appeared somewhere between those two versions.

> [@A few problems with Slicer 4.13](https://discourse.slicer.org/t/a-few-problems-with-slicer-4-13/13973):
>
> I know you are in a big process of upgrading Slicer with VTK9 in particular, and some runtime problems can be expected. Just reporting what I found so far on Arch Linux / Qt 5.15.1. Factory built Slicer Only Slicer appearence themes are proposed in Application Settings, and not system themes like Breeze and Oxygen. 2D slice views are black empty. Home built Slicer 2D slice views are black empty. Rotating 3D view with left mouse button down changes window state from maximized to ‘…

> [@No images shown in slice viewers in latest preview release (Slicer-4.13.0)](https://discourse.slicer.org/t/no-image-comes-up-in-the-viewers-after-loading-data/13899):
>
> Problem report for Slicer 4.13.0-2020-10-05 win-amd64: [please describe expected and actual behavior] I am running Windows 10 on ASUS AiO desktop (Intel Core i5, RAM 16 GB, NVIDIA GeForce GTX 1050, updated drivers and application software). The loaded image is there - intensity values are displayed along with mouse cursor coordinates when moved over the viewers. The viewers brightness does not change, remains black when attempting to control it with mouse (left-click-and-drg in slice view). Wh…
