_volumeProperty = vtkVolumeProperty::New();
_volumeProperty->SetInterpolationTypeToLinear();
- //_volumeProperty->ShadeOn();
- _volumeProperty->DisableGradientOpacityOn();
- _tfun = vtkPiecewiseFunction::New();
+ _volumeProperty->ShadeOn();
+ _volumeProperty->SetAmbient(3);
+ _volumeProperty->SetDiffuse(0.2);
+ _volumeProperty->SetSpecular(0.5);
+ //_volumeProperty->DisableGradientOpacityOn();
+ _tfun = vtkPiecewiseFunction::New();
_volumeProperty->SetScalarOpacity(_tfun );
_ctfun = vtkColorTransferFunction::New();
}
void VolumeRendererManagerData::SetIndependentComponents(bool independent){
- if(!independent){
- _volumeProperty->IndependentComponentsOff();
- }else{
+ if(independent){
_volumeProperty->IndependentComponentsOn();
+ }else{
+ _volumeProperty->IndependentComponentsOff();
}
}