[vtkusers] transparency and slowdown with vtkImagePlaneWidget

Dean Inglis dean.inglis at camris.ca
Mon May 25 21:05:39 EDT 2009


what happens if you do comment out SetTexturePlaneProperty 

(ie don't use ipwProp).

 

Dean

 

Subject: Re: [vtkusers] transparency and slowdown with vtkImagePlaneWidget

 

The bitmaps are RGB images, but converting to grayscale doesn't change
anything. I tried PNG images and I got the same result. I tried a few
different values for opacity after I last posted to the list and it did have
an effect... values smaller than 1.0 made it even more transparent. I
attached an image of what I'm getting with opacity of 1.0. The ipwProp is
setup as below:

vtkProperty* ipwProp = vtkProperty::New(); 
 ipwProp->SetOpacity(1.0); 
 ipwProp->ShadingOff();

 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(); 

I'm wondering if I need to convert the output of the image reader into a
different vtk format?
-Greg



Dean Inglis wrote: 

hi Greg,

 

are your bitmaps multi- or single component images?

How is ipwProp set up?  Does it have its opacity set

to some value other than 1?

planeWidgetX->SetTexturePlaneProperty(ipwProp);

 

Dean

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Dean Inglis, PhD

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~ Center for Appendicular ~~~~~

Magnetic Resonance Imaging Studies

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

610 - 25 Charlton Ave. E.

Hamilton, Ontario, L8N 1Y2

fax: (905) 521-1297

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Assistant Professor (Adjunct)

Department of Civil Engineering

McMaster University

Hamilton, Ontario

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Software Demos:

http://www.youtube.com/watch?v=_zYNtHC9-0s

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090525/e7616a8d/attachment.htm>


More information about the vtkusers mailing list