[vtkusers] transparency and slowdown with vtkImagePlaneWidget
    Greg Book 
    gbook at gbook.org
       
    Fri May 22 14:49:46 EDT 2009
    
    
  
I was able to figure out the slowdown problem. I had cubic filtering enabled in one of the planes. Switching it to linear filtering made it much faster.
I'm still having the transparency problem though. All of the planes have the same level of transparency, which appears to be about 50%. It's neat, but I don't want it. I'm wondering if I'm mistakenly applying a filter somewhere, or not setting the texture or lighting properties correctly? The following code creates one of the 3 planes I use:
  vtkProperty* ipwProp = vtkProperty::New();
  ipwProp->SetOpacity(1.0);
  ipwProp->ShadingOff();
   //assign default props to the ipw's texture plane actor
  planeWidgetX = vtkImagePlaneWidget::New();
    planeWidgetX->SetInteractor( vtkWindow);
    planeWidgetX->SetKeyPressActivationValue('x');
    planeWidgetX->SetPicker(picker);
    planeWidgetX->RestrictPlaneToVolumeOn();
    planeWidgetX->GetTexturePlaneProperty()->SetOpacity(1.0);
    planeWidgetX->GetPlaneProperty()->SetColor(1,0,0);
    planeWidgetX->SetTexturePlaneProperty(ipwProp);
    planeWidgetX->TextureInterpolateOn();
    planeWidgetX->SetResliceInterpolateToLinear();
    planeWidgetX->SetInput(v16->GetOutput());
    planeWidgetX->SetPlaneOrientationToXAxes();
    planeWidgetX->SetSliceIndex(32);
    planeWidgetX->DisplayTextOn();
    planeWidgetX->On();
    planeWidgetX->InteractionOn();
Changing the opacity value doesn't change anything though.
-Greg
    
    
More information about the vtkusers
mailing list