Hi, when I try the PaintWidge Example, I want to add more than one point of vtkColorTransferFunction which means label “1” will be gray and label “2” will be red for example.
labelMap.cfun.addRGBPoint(1, 1, 1, 1); // label "1" will be gray
labelMap.cfun.addRGBPoint(2, 1, 0, 0); // label "2" will be red
But when I set the label to “2” and paint some region, I found the drawn image borders are displayed in gray. Can anyone answer my confusion? Any suggestions will be helpful.
Thanks for your reply. In Figure 1, I set “1” value to “1, 1, 1”(gray) and set “2” value to “1, 0, 0”(red). When I set the paint label to 1, paint operations can be displayed normally, but when I set the label to 2, the red region has a very thin gray borders. Is it a problem with my settings?
Hi, Forrest. I updated the dependencies(now 24.18.7) and added this statement, but the problem still exists. As show in the picture, I just added the following code according to PaintWidget Example
labelMap.cfun.addRGBPoint(1, 1, 0, 0); // label "1" will be red
labelMap.cfun.addRGBPoint(2, 0, 1, 0); // label "2" will be green
labelMap.cfun.addRGBPoint(3, 0, 0, 1); // label "3" will be blue
labelMap.actor.getProperty().setUseLookupTableScalarRange(true)