c++ - Writing ITK (insight Toolkit) results to local buffer -
After implementing the ITK Filter Pipeline, how do I return a buffer to use the results (outside ITK)?
/ h3>
Example Book 1: Chapter 4.1.7: "Importing Image Data from Buffers" ", and is also found in this example.
This shows how anyone can wrap the ITK pointer around the C ++ array to use it using the ImportImageFilter object, however, this example then filtered results Uses the
Writer object to be written in the file.
How do I write filtered results into other C ++ arrays? Or how do I overwrite the array which I have used as input?
In short, I have an application in which buffer (
localBuffer ) has an image in which I can follow the example code:
[...] const bool filterOwnsBuffer = false; ImportFilter-> SetImportPointer (localBuffer, size [0] * size [1], filter ovensbuffer); Then I can use it in any ITP pipeline and update it at a certain level:
[...] FilterType :: Pointer Filter = Filter Type :: New (); Filter-> Set input (import-filter-> getOutput ()); Filter & gt; Updates (); How do I ensure that the localbuffer is filtered values? Or, alternatively, how do I set up a different resultbuffer for output values? Do I have to manually use the image itater and 'loop' on my buffer? Or I use filter-> Can GetOutput () use more directly?
A small code example or a link for an example would be greatly appreciated (only "exporting image data to a buffer" is equivalent to an example of import.) < / P>
image type :: indicator output = filter-> getOutput (); ImageType :: Pixel Container * Output Container = Output-> GetPixelContainer (); Image Type: Pixel Container :: Element * ResultsBuffer = Output Container-> GetBufferPointer (); See the documentation and documentation.
Comments
Post a Comment