[vtkusers] invert the color of pixels

Shang Mu smu.email at gmail.com
Mon Aug 27 16:45:58 EDT 2007


I'm trying to invert the color of an image of type unsigned char, i.e.
black to white and white to black. To my suprise i could not find a
vtk filter that does this job. Does vtk have such a filter somewhere?

I've went through the vtk filters several times and could not find
such a filter. The "invert" in vtkImageMathematics returns the
reciprocal of each pixel, not in the sense of image color.

Thanks!

Shang



More information about the vtkusers mailing list