I am trying to add colors to a volume. It works for me using the vtkImageMapper, but the vtkImageResliceMapper gives weird interpolation artefacts (see images).
Is this the CTF that is is applied to the labels? And is there just one label (binary image) or multiple labels? When using a binary image, it can be useful to vary only the opacity, while keeping the color constant:
The code looked strange because I edited out some things wrong We are trying to show multiple labels. In the picture below you can see the result of you function (I made all the labels green, and gave some an opacity of 0, and some 0.5):
you can see that the edges of the labels get rounded off, and when zooming in you can see that some type of interpolation is happening between the opaque and translucent parts. Do you have an idea what causes this?
=> I generated the picture with the green labels like this.
We have a working version using vtkImageMapper, and I can confirm that we get the results of the first pictures that I sent when I change the interpolation method to ‘LINEAR’. I believe the vtkImageResliceMapper indeed ignores the interpolation settings. Do you know if we can patch it, or if there is an alternative way to get the same results as the vtkImageResliceMapper?