Closed sanderteirlynck closed 1 year ago
You're using a vtkVolumeMapper
when the input data is a polydata. You should use vtkMapper + vtkActor
instead.
Thank you for the suggestion, @floryst. That did solve the issue. Stupid mistake, as I tried this before but that threw an error as well, since I was changing the colors of the volumes. Removing the code to apply color to the volume rendered everything as expected. Thanks again!
High-level description
Unable to render ImageData coming from a Niftii file after using ImageMarchingCubes and WindowedSincPolyDataFilter.
Steps to reproduce
The (cleaned up) code I'm using that throws the error:
Detailed behavior
I'm unable to render ImageData from a Niftii file after trying to apply smoothing.
When I render the imageData variable, my volume appears and is interactive, as expected. However, it looks like there's some stair-stepping happening, so I'm trying to apply smoothing. That's where things go wrong.
When I apply smoothing by using ImageMarchingCubes and WindowedSincPolyDataFilter, the error appears in my browser. I've tried multiple browsers, I've tried a whole lot of suggestions online, I've tried other ways to render my file, I've tried applying PolyDataNormals on my WindowedSincPolyDataFilter output, I've tried upgrading the version through npm, ... But nothing seems to work.
I've opened a thread on the VTK Forums, but the suggestion I received didn't fix the issue. I've since tried other possible fixes, but nothing seems to work. Could this be a bug?
On Firefox the errors reads as follows:
Expected behavior
After applying ImageMarchingCubes and WindowedSyncPolyDataFilter and rendering the output, a smooth volume appears.
Environment