I’m working on the resliceCursorWidget demo,and did
setColorLevel(1000), setColorWindow(4000) to change color on the property of the vtkImageSlice instance for better look, but when I make a rotation or some transform, the background seems not to be correct. This is what it looks like,
What I’m expecting is the edge parts(pointed by blue arrows) should be the same with the empty part(pointed by the green arrow).
What I’ve done on ImageReslice instance are:
setBackgroundColor(0, 0, 0, 0);
Is there any idea for this?
I wonder if this commit has fixed the
Would you mind trying with latest master branch?
Please note that the background color variable is still not well handled. It should have as many components as your input volume (e.g. 3 if input volume is RGB, 1 if input volume is single scalar).
I tried the latest 25.11.0 but it seems not work, my input volume is single scalar from a series of CT scan, when I did
setBackgroundColor(0, 0, 0) I got
Invalid number of values for array setter (backgroundColor) , it only worked when I did
setBackgroundColor(0, 0, 0, 0) but the problem still remained
This is a CT image, so the black area probably has a value of -1000. Try this:
In a CT image that uses Hounsfield units, the following values can be useful:
+1000 hard bone
Since vtk.js doesn’t have
setBackgroundLevel(), do this instead:
setBackgroundColor(-1000.0, -1000.0, -1000.0, 0.0);