[vtkusers] How to set Rotation Point?
Stephan Theisen
StephanTheisen at gmx.de
Sun Feb 20 12:37:46 EST 2005
Hi together!
I've the following question: How can I set the the Point about my Volune
rotate?
Because my Volume rotate about a point outside of the volume and I it
should rotate about
the center of the volume.
For help I've attached the important cutout of my programm.
vtkVolume16Reader volumer = new vtkVolume16Reader();
volumer.SetDataDimensions(512,512);
volumer.SetDataByteOrderToLittleEndian();
volumer.SetFilePrefix ("G:/CT-Bilder_umbenannt/quarter");
volumer.SetImageRange(1,200);
volumer.SetDataSpacing(0.488,0.488,1.0);
vtkExtractVOI voi = new vtkExtractVOI();
voi.SetInput(volumer.GetOutput());
voi.SetVOI(110,400,30,480,0,200);
vtkPiecewiseFunction opacityTransferFunction = new
vtkPiecewiseFunction();
opacityTransferFunction.AddPoint(1000,0.0);
opacityTransferFunction.AddPoint(1150,1.0);
vtkColorTransferFunction colorTransferFunction = new
vtkColorTransferFunction();
colorTransferFunction.AddRGBPoint(255.0,1.0,0.49,0.25);
vtkVolumeProperty volumeprop = new vtkVolumeProperty();
volumeprop.SetColor(colorTransferFunction);
volumeprop.SetScalarOpacity(opacityTransferFunction);
volumeprop.ShadeOn();
volumeprop.SetInterpolationTypeToLinear();
vtkVolumeRayCastCompositeFunction compositefunction = new
vtkVolumeRayCastCompositeFunction();
vtkVolumeRayCastMapper volumemapper = new vtkVolumeRayCastMapper();
volumemapper.SetVolumeRayCastFunction(compositefunction);
volumemapper.SetInput(voi.GetOutput());
vtkVolume volume = new vtkVolume();
volume.SetMapper(volumemapper);
volume.SetProperty(volumeprop);
Thank's in advance
Stephan
More information about the vtkusers
mailing list