[vtkusers] How to get detailed information of a point after moving in vtkChartXY
Zhang Chuanting
zctzzy2008 at 163.com
Sat Aug 3 09:24:54 EDT 2013
Hi, everyone:
Now I am using VTK 5.10 to implement a GUI color and opacity transfer function editor. I found a test in VTK called "TestControlPointsHandleItem.cxx" which can basically meet my requirment in the website of http://vtk.org/gitweb?p=VTK.git;a=blob;f=Charts/Core/Testing/Cxx/TestControlPointsHandleItem.cxx.
In the test, I add 3 points:
vtkNew<vtkPiecewiseFunction> opacityFunction;
opacityFunction->AddPoint(-3024, 0, 0.5, 0.0 );
opacityFunction->AddPoint(217, .68, 0.33, 0.45 );
opacityFunction->AddPoint(3071, .80, 0.5, 0.0);
vtkNew<vtkColorTransferFunction> colorTransferFunction;
colorTransferFunction->SetColorSpaceToRGB();
colorTransferFunction->AddRGBPoint( -3024, 0, 0, 0, 0.5, 0.0 );
colorTransferFunction->AddRGBPoint( 217, .88, .60, .29, 0.33, 0.45 );
colorTransferFunction->AddRGBPoint( 3071, .83, .66, 1, 0.5, 0.0 );
the rendering effect is as follows:
I can select any point of these 3 points and move it to other position. My question is: how to get the detailed information (scalar value, opacity value and RGB value) of a point after moving. I want to get these value and then update the rendering effect of my medical images.
Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130803/0705784c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestControlPointsHandleItem 2013-08-03 20-45-08-34.gif
Type: image/gif
Size: 119452 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130803/0705784c/attachment.gif>
More information about the vtkusers
mailing list