[vtkusers] VolumePro problem
Stephan Theisen
StephanTheisen at gmx.de
Sat Mar 5 07:30:00 EST 2005
Hi together!
I've the following problem. I've developed my whole program in java and
it works realy fine.
But when I change the vtkVolumeRayCastMapper (within the program works)
into the
vtkVolumeProVPMapper, to get VolumePro support, I get no error during
compilation but
the window there the rendered volume should be displayed is black. I've
tryed a lot of things
but nothing works. Before I used the vtkVolumeProVPMapper I rebuilt VTK
within the folders
for the vli library and so on. After that I included the new vtk.jar
file in the classpath of my java sdk.
I send you the important part of my program and hope anybody can help me.
vtkPiecewiseFunction opacityTransferFunction =
new vtkPiecewiseFunction();
opacityTransferFunction.AddPoint(1000,0.0);
opacityTransferFunction.AddPoint(1150,1.0);
vtkColorTransferFunction colorTransferFunction =
new vtkColorTransferFunction();
colorTransferFunction.AddRGBPoint(1150,0.8,0.8,0.15);
vtkVolumeProperty volumeprop = new vtkVolumeProperty();
volumeprop.SetColor(colorTransferFunction);
volumeprop.SetScalarOpacity(opacityTransferFunction);
volumeprop.ShadeOn();
volumeprop.SetInterpolationTypeToLinear();
vtkVolumeRayCastCompositeFunction compositefunction =
new vtkVolumeRayCastCompositeFunction();
// vtkVolumeRayCastMapper volumemapper = new vtkVolumeRayCastMapper();
vtkVolumeProMapper volumemapper = new vtkVolumeproMapper();
//volumemapper.SetVolumeRayCastFunction(compositefunction);
volumemapper.SetInput(voi.GetOutput());
vtkVolume volume = new vtkVolume();
volume.SetMapper(volumemapper);
volume.SetProperty(volumeprop);
renWin.GetRenderer().AddVolume(volume);
contentPane = new Layout(renWin);
setContentPane(contentPane);
Thanks in advance
Stephan
More information about the vtkusers
mailing list