[vtkusers] VolumePro support is NOT any better ... Why???

Kevin Tiow Wee TAN twtan at cheerful.com
Mon Dec 2 10:16:24 EST 2002


Hello,
How are you?

Just wondering if any one have tried to use VolumePro support with
vtk-Java wrapping.

My experience with VolumePro is not looking good at all. I tried it on
VG500, the dataset volume (only about 300Mb) hardly even move at all,
when I tried to rotate.  I tried my program on another machine with
VP1000 card installed, it is better (as least the model move), but it is
not better than without using VolumePro support.

WITHOUT volumePro support, I used vtkVolumeRayCastMapper is actually
perform better than I used vtkVolumeProMapper, which I expect better
performance from the VolumePro cards.

I did tried to use volumeProMapper.PrintSelf(), and it is confirm that
vtk detected both VolumePro cards repectively.  My Java-VTK application
is not perform any better or worst than using vtkVolumeRayCastMapper (I
suppose this is without VolumePro card support)

I tried to use VolView, it is obviously better with the VolumePro card
installed... 

Any idea, why??? Any advice would be appreciated...

Please find my code with VolumePro support as following:

/********************/
vtkRenderer ren1 = new vtkRenderer();
ren1.SetBackground(0., 0., 0.);
ren1.GetActiveCamera().ParallelProjectionOn();
ren1.GetActiveCamera().SetParallelScale(40.0);

vtkRenderWindow renWin = new vtkRenderWindow();
renWin.AddRenderer(ren1);
renWin.SetSize(600,600);
renWin.SetPosition(300, 0);

vtkRenderWindowInteractor iren = new vtkRenderWindoInteractor();
iren.SetRenderWindow(renWin);
iren.SetDiresiredUpdateRate

vtkImageReader reader = new vtkImageReader();
reader.SetFileName(fileName);
reader.SetDataExtend(0, xSize-1, 0, ySize-1, 90, zSieze-1);
reader.SetFileDimensionality(3);
reader.SetHeaderSize(0);
reader.SetDataByteOrderToLittleEndian();
reader.SetDataScalarTypeToUnsignedChar();
reader.SetDataSpacing(vSize, vSize, vSize);
reader.GetOutput().ReleaseDataFlagOn();

vtkPiecewiseFunction opacityTransferFunction = new
vtkPiecewiseFunction();
opacityTransferFunction.AddPoint(20., 0.0);
opacityTransferFunction.AddPoint(255., 0.5);

vtkColorTransferFunction colorTransferFunction = new
vtkColorTransferFunction();
colorTransferFunction.AddRGBPoint (  0.0, 0.0, 0.0, 0.0 );
colorTransferFunction.AddRGBPoint ( 64.0, 1.0, 0.0, 0.0 );
colorTransferFunction.AddRGBPoint (128.0, 0.0, 0.0, 1.0 );
colorTransferFunction.AddRGBPoint (192.0, 0.0, 1.0, 0.0 );
colorTransferFunction.AddRGBPoint (255.0, 0.0, 0.2, 0.0 );

vtkVolumeProperty volumeProperty = new vtkVolumeProperty();
volumeProperty.SetColor ( colorTransferFunction );
volumeProperty.SetScalarOpacity(opacityTransfer);
volumeProperty.ShadeOff();

vtkVolumeProMapper volumeMapper = new vtkVolumeProMapper();
volumeMaper.SetInput(reader.GetOutput());

vtkVolume volume = new vtkVolume();
volume.SetMapper (volumeMapper);
volume.SetProperty (volumeProperty);

ren1.AddVoluem(volume);

renWin.Render();
iren.Start();

/**********************/

--
Thanks
Kevin
**********************************
Manchester Material Science Centre
University of Manchester
----------------------------------
Centre for Virtual Environments
University of Salford
**********************************



More information about the vtkusers mailing list