Assuming you are writing your own filter, if you aren&#39;t subclass the filter in question...<br><br>First create an itk::Image with the right metadata and with a pixel container that points to your pixel buffer. I suppose you know how to do that, if not, please look at Examplse/DataRepresentation/Image/Image5.cxx<br>
<br>Reimplement the GenerateData method and force it to use your <br><br>GenerateData()<br>{<br>  this-&gt;GetOutput()-&gt;GraftOutput( this-&gt;MyImage )<br><br>  .. // rest of the generate data method<br>}<br><br><div class="gmail_quote">
On Tue, Mar 3, 2009 at 3:15 PM, Brady McCary <span dir="ltr">&lt;<a href="mailto:brady.mccary%2BITK@gmail.com">brady.mccary+ITK@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
insight-users,<br>
<br>
I have a pixel buffer already allocated that I would like to tell an<br>
image filter to use for its output. I would like to tell the filter to<br>
use this buffer instead of allocating its own. Would someone please<br>
respond with the correct sequence to accomplish this?<br>
<br>
Brady<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Karthik Krishnan<br>R&amp;D Engineer,<br>Kitware Inc.<br>Ph: 518 371 3971 x119<br>Fax: 518 371 3971<br>