[vtkusers] Confusion with vtkColorTransferFunction and vtkPiecewiseFunction
Dženan Zukić
dzenanz at gmail.com
Fri May 6 07:44:48 EDT 2011
The intensity for transfer functions are in the same units as the image
pixel intensity, whatever that might be. If you are using CT images then it
is Hounsfield unit. If you are using MRI, then it is some unnamed measured
value.
HTH
On Fri, May 6, 2011 at 08:33, Chasan KIOUTSOUKMOUSTAFA <chasank at gmail.com>wrote:
> I have a pipeline that does volume rendering from DICOM datasets. I'm using
> vtkColorTransferFunction and vtkPiecewiseFunction classes.
> at vtkColorTransferFunctions's documentation<http://www.vtk.org/doc/nightly/html/classvtkColorTransferFunction.html#aa3bd656f032908593e89f749796ed786>first parameter of AddRGBPoint method is double x which is not mentioned
> what exactly it is?
> Is it Hounsfeild Unit ?
> Same deficient documentation<http://www.vtk.org/doc/nightly/html/classvtkPiecewiseFunction.html#a5196b67dda9f5ba027797176e4d566a0>does not tell anything to me. Okay, second parameter is the opacity value
> that might change 0.0 to 1.0
> What about the first parameter ( double x) Is it again Hounsfeild Unit ?
> Thanks for help from now..
>
> volumeColor = vtkSmartPointer<vtkColorTransferFunction>::New();
> volumeColor->AddRGBPoint(0, 0.0, 0.0, 0.0);
> volumeColor->AddRGBPoint(500, 1.0, 0.5, 0.3);
> volumeColor->AddRGBPoint(1000, 1.0, 0.5, 0.3);
> volumeColor->AddRGBPoint(1150, 1.0, 1.0, 0.9);
>
> volumeScalarOpacity = vtkSmartPointer<vtkPiecewiseFunction>::New();
> volumeScalarOpacity->AddPoint(0, 0.00);
> volumeScalarOpacity->AddPoint(500, 0.15);
> volumeScalarOpacity->AddPoint(1000, 0.15);
> volumeScalarOpacity->AddPoint(1150, 0.90);
>
> volumeGradientOpacity = vtkSmartPointer<vtkPiecewiseFunction>::New();
> volumeGradientOpacity->AddPoint(0, 0.0);
> volumeGradientOpacity->AddPoint(90, 0.5);
> volumeGradientOpacity->AddPoint(100, 1.0);
>
> --
> Chasan KIOUTSOUKMOUSTAFA
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110506/73a58eae/attachment.htm>
More information about the vtkusers
mailing list