[vtkusers] How to display the points in a greyscale range in other colors for DICOM series via vtkImageViewers
Liu_tj
tjlp at netease.com
Sun Apr 10 13:14:38 EDT 2016
Hi, fblupi,
In your example, you change the vtkImageViewer2's vtkImageMapToWindowLevlColors, That will change the whole image color, instead of the points which fall in the greyscale range.
By the way, for "ctf->AddRGBPoint(density, red, green, blue)", what's the meaning of density? Is it the greyscale value? With the AddRGBPoint(), how to keep the initial color of other points which are beyond the greyscale range?
Thanks
Liu Peng
在2016-04-10,"fblupi" <fboli94 at gmail.com> 写道: -----原始邮件-----
发件人:"fblupi" <fboli94 at gmail.com>
发送时间:2016年04月10日 星期日
收件人:"vtkusers" <vtkusers at vtk.org>
主题:Re: [vtkusers] How to display the points in a greyscale range in other colors for DICOM series via vtkImageViewers
If you use vtkImageViewer2 it's easy adding color and you can do it by
setting a vtkColorTransferFunction previously defined. Something like this:
...
iv2 = vtkSmartPointer<vtkImageViewer2>::New();
ctf = vtkSmartPointer<vtkColorTransferFunction>::New();
// add colors some colors with ctf->AddRGBPoint(density, red, green, blue);
iv2->GetWindowLevel()->SetLookupTable(ctf);
...
I hope you will find this useful.
--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-display-the-points-in-a-greyscale-range-in-other-colors-for-DICOM-series-via-vtkImageViewers-tp5737603p5737604.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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
Search the list archives at: http://markmail.org/search/?q=vtkusers
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160411/c5bca3ae/attachment.html>
More information about the vtkusers
mailing list