Closed StevenRoger closed 3 years ago
Your JSON does not seems like what the applyPreset
expect.
I changed colorTransfer value
"colorTransfer": "16 0 0 0 0 1 1 0 0 2 0 1 0 3 0 0 1",
still not work, could you point out my JSON's errors, or give me a simple example. thx.
https://github.com/OHIF/react-vtkjs-viewport/blob/9480282a0e/examples/presets.js
thanks a lot, I refered this preset JSON.
If i don't use these JSON config, How can i achive what i want by using vtkColorTransferFunction?
cfun.addRGBPoint(1, 1, 0, 0); // label '1' will be red
cfun.addRGBPoint(2, 0, 1, 0); // label '2' will be green
cfun.addRGBPoint(3, 0, 0, 1); // label '3' will be blue
Why doesn't it work?
It should work but without seeing the result or what you do with your cfun it is hard to tell which part of the doesn't work you are talking about.
Closing this issue. If you still need help, please ask your question on our discussion forum: https://discourse.vtk.org/c/web/9
There is one volume data only include value: 0, 1, 2, 3, when rendered in 2d mode(MPR), the color displayed as expected.
but when i rendered in 3d mode(use applyPreset), i changed a preset:
the volume all displayed red. Is there anything i set wrong? Could you give me some suggestion.