<meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote">On Fri, Oct 22, 2010 at 7:21 PM, Alexis Cheng <span dir="ltr"><<a href="mailto:acheng_1221@hotmail.com">acheng_1221@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
Hi,<br><br>I'm attempting to inject a 2D vtkImageData object into a specific portion of another 2D vtkImageData object. i.e. Have the first vtkImageData object be displayed in a specified polygon within the second vtkImageData object.<br>
<br>I've tried using the blend function, but that doesn't seem to provide me with the option to specify the desired location.<br><br>I've also tried applying the images as textures onto polygons and repositioning these actors with respect to each other. The render window displays the desired merged image, but is there a way of converting this render window to a vtkImageData object?<br>
<br>I require the output to be a vtkImageData object as I intend to send it via an igtl link to Slicer.<br><br>Are either of these methods capable of the prescribed task? Are there any other methods that could be able to accomplish this? Thanks in advance!<br>
<br>Alexis Cheng<br>Electrical Engineering<br>University of British Columbia</div></blockquote><div><br></div><div>I believe this is the idea of "stenciling". I tried to make a demo, but I wasn't exactly sure what was going on. Maybe you can start from here and figure it out and fix the example :)</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Images/ImageStencil">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Images/ImageStencil</a></div>
<div class="gmail_quote"><br></div><div class="gmail_quote">You could also do it in ITK very easily:</div><div class="gmail_quote"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Images/ImageStencil"></a><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.vtk.org/Wiki/ITK/Examples/Images/PasteImageFilter">http://www.vtk.org/Wiki/ITK/Examples/Images/PasteImageFilter</a></div>
<div class="gmail_quote"><a href="http://www.vtk.org/Wiki/ITK/Examples/Images/PasteImageFilter"></a><br><div>David</div></div>