<div dir="ltr">Hi Sankhesh, <div>  Thanks so much! I tried your suggestion and it worked just fine. I really appreciate you taking the time to answer my question. </div><div>Cheers, </div><div>Wilf. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 20, 2017 at 1:47 PM, Sankhesh Jhaveri <span dir="ltr"><<a href="mailto:sankhesh.jhaveri@kitware.com" target="_blank">sankhesh.jhaveri@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="m_2854892421800866940markdown-here-wrapper" style="font-family:Verdana,Arial,sans-serif;color:rgb(11,83,148)"><p style="margin:0px 0px 1.2em!important">Hello Wilf,</p>
<p style="margin:0px 0px 1.2em!important">If you use the <code style="font-size:0.95em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(218,218,218);background-color:rgb(232,232,232);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">vtkGPUVolumeRayCastMapper</code>, you can enable the <code style="font-size:0.95em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(218,218,218);background-color:rgb(232,232,232);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">RenderToImage</code> mode that basically renders the volume to an OpenGL FrameBufferObject. It then has API like <code style="font-size:0.95em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(218,218,218);background-color:rgb(232,232,232);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">GetColorImage()</code> and <code style="font-size:0.95em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(218,218,218);background-color:rgb(232,232,232);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">GetDepthImage()</code> to get the color and depth data of the rendered result.</p>
<p style="margin:0px 0px 1.2em!important">Hope this helps.</p>
<p style="margin:0px 0px 1.2em!important">Thanks,<br>Sankhesh</p>
<div title="MDH:SGVsbG8gV2lsZiw8ZGl2Pjxicj48L2Rpdj48ZGl2PklmIHlvdSB1c2UgdGhlIGB2dGtHUFVWb2x1
bWVSYXlDYXN0TWFwcGVyYCwgeW91IGNhbiBlbmFibGUgdGhlIGBSZW5kZXJUb0ltYWdlYCBtb2Rl
IHRoYXQgYmFzaWNhbGx5IHJlbmRlcnMgdGhlIHZvbHVtZSB0byBhbiBPcGVuR0wgRnJhbWVCdWZm
ZXJPYmplY3QuIEl0IHRoZW4gaGFzIEFQSSBsaWtlIGBHZXRDb2xvckltYWdlKClgIGFuZCBgR2V0
RGVwdGhJbWFnZSgpYCB0byBnZXQgdGhlIGNvbG9yIGFuZCBkZXB0aCBkYXRhIG9mIHRoZSByZW5k
ZXJlZCByZXN1bHQuPC9kaXY+PGRpdj48YnI+PC9kaXY+PGRpdj5Ib3BlIHRoaXMgaGVscHMuPC9k
aXY+PGRpdj48YnI+PC9kaXY+PGRpdj5UaGFua3MsPC9kaXY+PGRpdj5TYW5raGVzaDwvZGl2Pg==" 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><div class="h5"><div dir="ltr">On Mon, Mar 20, 2017 at 11:36 AM Wilf Rosenbaum <<a href="mailto:wilf.rosenbaum@gmail.com" target="_blank">wilf.rosenbaum@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr" class="m_2854892421800866940gmail_msg">Hi Guys, <div class="m_2854892421800866940gmail_msg">  VTK noob here. Ignorant, but (hopefully) not stoopid. </div><div class="m_2854892421800866940gmail_msg"><br class="m_2854892421800866940gmail_msg"></div><div class="m_2854892421800866940gmail_msg">  I am interested in creating a volume rendering (VR) of a volumetric medical (CT) dataset, and then getting access to the pixel values of that volume rendering image. I can follow along with the SmartVolumeMapper example from the VTK examples website, which creates the VR for my dataset but displays the result in a vtkRenderWindow. Right now I don't want to display the VR image, I just want to get the pixel values and do something with them - pass them to a 3rd party program for instance. I understand that I could use a <span style="background-color:rgb(249,249,249);color:rgb(0,0,0);font-family:monospace,monospace;font-size:1em" class="m_2854892421800866940gmail_msg">vtkWindowToImageFilter </span>to convert the data in my RenderWindow to an image, but intuitively this seems like a rather circuitous route to get what I want. I suspect that there is a more direct standard vtk workflow. </div><div class="m_2854892421800866940gmail_msg"><br class="m_2854892421800866940gmail_msg"></div><div class="m_2854892421800866940gmail_msg">  I know that if I was interested in an orthogonal or an oblique slab through my volume I can create a pipeline like </div><div class="m_2854892421800866940gmail_msg"><br class="m_2854892421800866940gmail_msg"></div><div class="m_2854892421800866940gmail_msg">     vtkDicomImageReader -> vtkImageReslice -> vtkImageMapToColors </div><div class="m_2854892421800866940gmail_msg"><br class="m_2854892421800866940gmail_msg"></div><div class="m_2854892421800866940gmail_msg">and then call GetOutput() -> GetScalarPointer() on the vtkImageMapToColors object to get the pixels of the slab - no RenderWindow is required. Is there something analogous for volume rendering? </div><div class="m_2854892421800866940gmail_msg"><br class="m_2854892421800866940gmail_msg"></div><div class="m_2854892421800866940gmail_msg">If the real answer to my question is "create a hidden render window, render the volume into that hidden render window and then use a Window to Image Filter to get the image" then I am fine with that but I feel like I don't know enough about VTK yet to know for sure. </div><div class="m_2854892421800866940gmail_msg"><br class="m_2854892421800866940gmail_msg"></div><div class="m_2854892421800866940gmail_msg">Finally, please free to suggest some terms to google. I am happy to do more research, but I feel like I need to be pointed in the right direction. I am already looking into "vtk render to frame buffer" , "vtk render to image", "vtk offscreen rendering", ...</div><div class="m_2854892421800866940gmail_msg"><br class="m_2854892421800866940gmail_msg"></div><div class="m_2854892421800866940gmail_msg">Thanks very much!</div><div class="m_2854892421800866940gmail_msg">Cheers,</div><div class="m_2854892421800866940gmail_msg">Wilf  </div><div class="m_2854892421800866940gmail_msg">  </div></div></div></div>
______________________________<wbr>_________________<br class="m_2854892421800866940gmail_msg">
Powered by <a href="http://www.kitware.com" rel="noreferrer" class="m_2854892421800866940gmail_msg" target="_blank">www.kitware.com</a><br class="m_2854892421800866940gmail_msg">
<br class="m_2854892421800866940gmail_msg">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" class="m_2854892421800866940gmail_msg" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br class="m_2854892421800866940gmail_msg">
<br class="m_2854892421800866940gmail_msg">
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" class="m_2854892421800866940gmail_msg" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br class="m_2854892421800866940gmail_msg">
<br class="m_2854892421800866940gmail_msg">
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" class="m_2854892421800866940gmail_msg" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br class="m_2854892421800866940gmail_msg">
<br class="m_2854892421800866940gmail_msg">
Follow this link to subscribe/unsubscribe:<br class="m_2854892421800866940gmail_msg">
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" class="m_2854892421800866940gmail_msg" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><span class="HOEnZb"><font color="#888888"><br class="m_2854892421800866940gmail_msg">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div class="m_2854892421800866940inbox-markdown-here-wrapper" style="font-family:'proza libre',sans-serif;color:rgb(0,56,107)"><h5 id="m_2854892421800866940inbox-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="m_2854892421800866940inbox--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/" target="_blank">Kitware</a> | <a href="tel:(518)%20881-4417" value="+15188814417" target="_blank">(518) 881-4417</a></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>
</font></span></blockquote></div><br></div>