vtkImageActor won't show color image if previously setinput grayscale image
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The vtkImageActor won't be able to display color image if it was setinput for a grayscale image previously. It will only show one channel of the color image as if it is a grayscale image.
vtk_actor.SetInput(grayscaleImageData); //the vtk_actor will display grayscale image correctly vtk_actor.SetInput(colorImageData); //the vtk_actor will display the color image in grayscale //no matter how you switch the color/grayscale image, the vtk_actor will always display in grayscale.
However, if we do vtk_actor.SetInput(colorImageData); //the vtk_actor will display color image correctly vtk_actor.SetInput(grayscaleImageData); //the vtk_actor will display grayscale image correctly //now matter how you switch color/grayscale image, the vtk_actor will always display them correctly. //the vtk_actor will display color image
This problem is observed on the newest vtk 5.1