[vtkusers] Coloring subvolumes
sankhesh.jhaveri at kitware.com
Tue Jan 10 10:18:20 EST 2017
I don’t think its possible to directly apply the color transfer function to
You can use the label map mask to achieve the desired results. An example
is provided as a test for composite mask blend
You would have to create the mask volume based on the sub-volume of
interest and set the mask color function and mask blend factor accordingly.
Alternatively, you could use multi-component support of the volume mapper.
You can create a new vtkImageData from your slices with two components. The
first component would be your whole volume with voxels in the sub-volume
set to a value that would be transparent in the opacity transfer function.
The second component would consist of non-transparent values on voxels in
the sub-volume region. Finally, setting two different color transfer
functions (one for each component) would do the trick. Make sure to set the
components as independent in the volume property.
Hope that helps.
On Mon, Jan 9, 2017 at 4:43 PM Tatarowicz, John <tatarowiczj at battelle.org>
> Hello All-
> I’m a relatively new user to the VTK toolkit. I am currently rendering
> medical CT data which has a color transfer function applied for the whole
> scan. Suspect masses in the scan have bounding boxes (vtkBoxWidget)
> defined around them. I would like to be able to toggle a change in their
> colorization (to and from red) in order to highlight possible cancerous
> masses. Is it possible to change the color transfer function only in a
> subvolume such that a predefined CT number range has its color changed to
> red? I would just change the color transfer function for the defined CT
> number range over the whole scan, but I want to only highlight objects in
> the predefined suspect areas.
> John Tatarowicz
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com/> | (518) 881-4417
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers