question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

issue rendering 2D vtk image

See original GitHub issue

itkwidgets 0.32.0 on OSX catalina, issues displaying image used by the 2D display notebook example (both code blocks work when I tried a 3D image)

  1. This code works
import itk
from itkwidgets import view

view(itk.imread('cthead1.png'))
  1. This doesn’t (nothing displayed, no error issued)
import vtk
from itkwidgets import view

reader = vtk.vtkPNGReader()
reader.SetFileName('cthead1.png')
reader.Update()
view(reader.GetOutput())

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dave3dcommented, Feb 22, 2021

https://github.com/InsightSoftwareConsortium/itkwidgets/pull/402 Fixed it. My 2nd commit checks for a zdim==1. In that case set up the dims, spacing & origin as 2d arrays.

0reactions
thewtexcommented, May 14, 2021

Closing this since #402 should have addressed it.

@zubair-ahmed-ai please try using itkwidgets 0.32.1. itkwidgets does support color RGB images. If issues are observed, please open another issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Render 2d image · Issue #1525 · Kitware/vtk-js - GitHub
I used ImageHelper.imageToImageData function for the image I want to render, but I don't know how to include ImageData in the rendering ......
Read more >
Retaining the color of the 2d image used for Volume Rendering.
Hello Everyone: I am very new to volume rendering, and I was able to render a 3d Volume using stack of 2D images...
Read more >
VTK rendering 2D mesh in python - Stack Overflow
SetEdgeColor(1,1,1) actorP.GetProperty().SetOpacity(0.2) # transparency ... renderer.AddActor(actorP). enter image description here.
Read more >
[vtkusers] 3D model and 2d Image overlay - Kitware
[vtkusers] 3D model and 2d Image overlay - depth issues, flickering ... I tried using the renderer->setlayer function http://www.vtk.org/Wiki/VTK/ ...
Read more >
[vtkusers] 3D model and 2d Image overlay - depth issues ...
I tried using the renderer->setlayer function http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/BackgroundImage
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found