[vtkusers] Assigning Colors in Volume Rendering
prabhat246
prabhat246 at yahoo.com
Tue Feb 17 05:19:08 EST 2009
Hi,
I am using following code for volume rendering of Binary Image
which has only two scalar values -3024 and -3023. But the output In am
getting is black and gray color. How can I get black and white only??
vtkColorTransferFunction *cTFun =
vtkColorTransferFunction::New();
cTFun->SetVectorModeToMagnitude();
cTFun->AddRGBPoint( -3024.0, 0.0, 0.0, 0.0 );
cTFun->AddRGBPoint( -3023.0, 1.0, 1.0, 1.0 );
vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New();
volumeProperty->SetColor(cTFun);
//volumeProperty->SetGradientOpacity(goTFun);
volumeProperty->SetScalarOpacity(oTFun);
volumeProperty->ShadeOn();
Thanks,
Regards
Prabhat
--
View this message in context: http://www.nabble.com/Assigning-Colors-in-Volume-Rendering-tp22054285p22054285.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list