[vtkusers] vtkImageCanvasSource2D ScalarType
David Doria
daviddoria+vtk at gmail.com
Mon Dec 14 15:49:18 EST 2009
If I do this, it works fine:
drawing->SetScalarTypeToDouble();
drawing->SetDrawColor(255.0, 0.0, 0.0, 0.5);
However, if I try to use UnsignedChar:
drawing->SetScalarTypeToUnsignedChar();
drawing->SetDrawColor(255, 0, 0, 0.5);
I end up with junk all over the image (random pixel which were written
to that shouldn't have been). Anyone know why this may be the case?
Also, I'm confused about the types. I thought 1.0 would be the max
value when the scalar type is double, but I still have to use 255. Why
is this?
One last thing - is the 4th parameter the alpha of the draw color?
Thanks,
David
More information about the vtkusers
mailing list