<div dir="ltr"><div class="markdown-here-wrapper" style="font-family:Verdana,Arial,sans-serif;color:rgb(11,83,148)"><p style="margin:0px 0px 1.2em!important">Hi John,</p>
<p style="margin:0px 0px 1.2em!important">I don’t think its possible to directly apply the color transfer function to a sub-volume.</p><p style="margin:0px 0px 1.2em!important">You can use the label map mask to achieve the desired results. An example is provided as a test for <a href="https://gitlab.kitware.com/vtk/vtk/blob/a1e7fab2ae19f86e9b1f8b97ca53329227f53161/Rendering/Volume/Testing/Cxx/TestGPURayCastCompositeMaskBlend.cxx">composite mask blend</a>. 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.</p><p style="margin:0px 0px 1.2em!important">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.</p>
<p style="margin:0px 0px 1.2em!important">Hope that helps.</p>
<p style="margin:0px 0px 1.2em!important">Sankhesh</p>
<div title="MDH:SGkgSm9obiw8ZGl2Pjxicj48L2Rpdj48ZGl2PkkgZG9uJ3QgdGhpbmsgaXRzIHBvc3NpYmxlIHRv
IGRpcmVjdGx5IGFwcGx5IHRoZSBjb2xvciB0cmFuc2ZlciBmdW5jdGlvbiB0byBhIHN1Yi12b2x1
bWUuIEFsdGhvdWdoLCB0aGUgdm9sdW1lIG1hcHBlciBzdXBwb3J0cyBtdWx0aS1jb21wb25lbnQg
dm9sdW1lcyBhbmQgYWxsb3dzIHNldHRpbmcgY29sb3IgYW5kIG9wYWNpdHkgdHJhbnNmZXIgZnVu
Y3Rpb25zIHBlciBjb21wb25lbnQuIFlvdSBjYW4gY3JlYXRlIGEgbmV3IHZ0a0ltYWdlRGF0YSBm
cm9tIHlvdXIgc2xpY2VzIHdpdGggdHdvIGNvbXBvbmVudHMuIFRoZSBmaXJzdCBjb21wb25lbnQg
d291bGQgYmUgeW91ciB3aG9sZSB2b2x1bWUgd2l0aCB2b3hlbHMgaW4gdGhlIHN1Yi12b2x1bWUg
c2V0IHRvIGEgdmFsdWUgdGhhdCB3b3VsZCBiZSB0cmFuc3BhcmVudCBpbiB0aGUgb3BhY2l0eSB0
cmFuc2ZlciBmdW5jdGlvbi4gVGhlIHNlY29uZCBjb21wb25lbnQgd291bGQgY29uc2lzdCBvZiBu
b24tdHJhbnNwYXJlbnQgdmFsdWVzIG9uIHZveGVscyBpbiB0aGUgc3ViLXZvbHVtZSByZWdpb24u
IEZpbmFsbHksIHNldHRpbmcgdHdvIGRpZmZlcmVudCBjb2xvciB0cmFuc2ZlciBmdW5jdGlvbnMg
KG9uZSBmb3IgZWFjaCBjb21wb25lbnQpIHdvdWxkIGRvIHRoZSB0cmljay4gTWFrZSBzdXJlIHRv
IHNldCB0aGUgY29tcG9uZW50cyBhcyBpbmRlcGVuZGVudCBpbiB0aGUgdm9sdW1lIHByb3BlcnR5
LjwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+QW4gYWx0ZXJuYXRpdmUgd291bGQgYmUgdG8gc2V0
IGEgY29tcG9zaXRlIG1hc2sgb24gdGhlIHZvbHVtZSBtYXBwZXIuIEhvd2V2ZXIsIGJhc2VkIG9u
IHRoZSBsb2NhdGlvbiBhbmQgaW50ZW5zaXR5IG9mIHRoZSBzdWItdm9sdW1lLCB0aGUgcmVzdWx0
cyBtaWdodCB2YXJ5LjwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+SG9wZSB0aGF0IGhlbHBzLjwv
ZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+U2Fua2hlc2g8L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 9, 2017 at 4:43 PM Tatarowicz, John <<a href="mailto:tatarowiczj@battelle.org">tatarowiczj@battelle.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72" class="gmail_msg">
<div class="m_716724440811725009WordSection1 gmail_msg">
<p class="MsoNormal gmail_msg">Hello All-<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
<p class="MsoNormal gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></p>
<p class="MsoNormal gmail_msg">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.<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
<p class="MsoNormal gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></p>
<p class="MsoNormal gmail_msg">Cheers,<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
<p class="MsoNormal gmail_msg">John Tatarowicz<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
</div>
</div>

_______________________________________________<br class="gmail_msg">
Powered by <a href="http://www.kitware.com" rel="noreferrer" class="gmail_msg" target="_blank">www.kitware.com</a><br class="gmail_msg">
<br class="gmail_msg">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" class="gmail_msg" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br class="gmail_msg">
<br class="gmail_msg">
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" class="gmail_msg" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br class="gmail_msg">
<br class="gmail_msg">
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" class="gmail_msg" target="_blank">http://markmail.org/search/?q=vtkusers</a><br class="gmail_msg">
<br class="gmail_msg">
Follow this link to subscribe/unsubscribe:<br class="gmail_msg">
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" class="gmail_msg" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br class="gmail_msg">
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div class="inbox-markdown-here-wrapper" style="font-family:'proza libre',sans-serif;color:rgb(0,56,107)"><h5 id="inbox-sankhesh-jhaveri" style="margin:1.3em 0px 1em;padding:0px;font-size:1.1em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-weight:bold;color:rgb(11,65,148)">Sankhesh Jhaveri</h5>
<h6 id="inbox--sr-research-development-engineer-kitware-http-www-kitware-com-518-881-4417" style="margin:1.3em 0px 1em;padding:0px;font-size:1em;color:rgb(11,83,148);font-family:'open sans',sans-serif;font-weight:normal"><em>Sr. Research & Development Engineer</em> | <a href="http://www.kitware.com/">Kitware</a> | (518) 881-4417</h6>
<div title="MDH:PGIgc3R5bGU9ImZvbnQtZmFtaWx5OiB2ZXJkYW5hLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDEx
LCA4MywgMTQ4KTsiPjxmb250IHNpemU9IjIiPiMjIyMjU2Fua2hlc2ggSmhhdmVyaTwvZm9udD48
L2I+PGRpdj48Zm9udCBjb2xvcj0iIzBiNTM5NCIgZmFjZT0idmVyZGFuYSwgc2Fucy1zZXJpZiIg
c2l6ZT0iMiI+PGI+PGJyPjwvYj48L2ZvbnQ+PGRpdj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6
IGFyaWFsLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDExLCA4MywgMTQ4KTsiPjxzcGFuIHN0eWxl
PSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsiPjxpPiMjIyMjIypTci4gUmVzZWFy
Y2ggJmFtcDsgRGV2ZWxvcG1lbnQgRW5naW5lZXIqPC9pPiZuYnNwO3wmbmJzcDs8L3NwYW4+PC9z
cGFuPjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsgY29sb3I6
IHJnYigxMSwgODMsIDE0OCk7Ij48YSBocmVmPSJodHRwOi8vd3d3LmtpdHdhcmUuY29tLyIgdGFy
Z2V0PSJfYmxhbmsiIHN0eWxlPSJjb2xvcjogcmdiKDE3LCA4NSwgMjA0KTsiPktpdHdhcmU8L2E+
Jm5ic3A7fCZuYnNwOzwvc3Bhbj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6IHZlcmRhbmEsIHNh
bnMtc2VyaWY7IGNvbG9yOiByZ2IoMTEsIDgzLCAxNDgpOyI+KDUxOCkgODgxLTQ0MTc8L3NwYW4+
PGJyPjwvZGl2PjxkaXY+PGRpdj48ZGl2PjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFu
YSwgc2Fucy1zZXJpZjsgY29sb3I6IHJnYigxMSwgODMsIDE0OCk7Ij48L3NwYW4+PC9kaXY+PC9k
aXY+PC9kaXY+PC9kaXY+" style="height:0px;width:0px;max-height:0px;max-width:0px;overflow:hidden;font-size:0em;padding:0px;margin:0px">​</div></div></div></div>