[Insight-users] How To Specify PixelContainer for the output of a Filter
Karthik Krishnan
karthik.krishnan at kitware.com
Tue Mar 3 17:44:48 EST 2009
Assuming you are writing your own filter, if you aren't subclass the filter
in question...
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
Reimplement the GenerateData method and force it to use your
GenerateData()
{
this->GetOutput()->GraftOutput( this->MyImage )
.. // rest of the generate data method
}
On Tue, Mar 3, 2009 at 3:15 PM, Brady McCary
<brady.mccary+ITK at gmail.com<brady.mccary%2BITK at gmail.com>
> wrote:
> insight-users,
>
> I have a pixel buffer already allocated that I would like to tell an
> image filter to use for its output. I would like to tell the filter to
> use this buffer instead of allocating its own. Would someone please
> respond with the correct sequence to accomplish this?
>
> Brady
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
--
Karthik Krishnan
R&D Engineer,
Kitware Inc.
Ph: 518 371 3971 x119
Fax: 518 371 3971
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090303/6991b974/attachment-0001.htm>
More information about the Insight-users
mailing list