Hi Daniel,<br><br>Nice catch. The Streaming filter doesn&#39;t look like it supports generation of multiple outputs. Jim Miller would be able to say more on it. Seems like it should be an easy fix though. It just needs to copy the outputs from each updated tile into the streaming filter&#39;s output. It does so just for&nbsp; the first output right now in lines 150-174 of 
itkStreamingImageFilter.txx.&nbsp; I suppose that should loop over the number of outputs. <br><br>Please log this as a bug report at <a href="http://itk.org/Bug">itk.org/Bug</a><br>
<br>Also, there is are a few lines that I think are unnecessary in the filter ?? (lines 114-120) where the output is allocated. Doesn&#39;t the superclass take care of that ? (In any case leaving them causes no harm, data isn&#39;t really allocated twice).
<br><br>Daniel, you may also want to check the RecursiveMultiResolutionPyramid filter to see if each of its internal filters release their data, ie set their ReleaseDataFlagOn(). It is possible to reduce bulk memory usage by having each filter release its bulk data downstream when the filter downstream is done with it. The default is to have each filter maintain a copy of its output.
<br><br>as in <br>&nbsp; smoother-&gt;SetInput(..)<br>&nbsp; smoother-&gt;ReleaseDataFlagOn();<br>&nbsp; shrinker-&gt;SetInput(smoother-&gt;GetOutput())<br>&nbsp; shrinker-&gt;ReleaseDataFlagOn();<br>&nbsp; <br>HTH<br>--<br>karthik<br><br><br>On 3/2/07, 
<b class="gmail_sendername">Daniel Maleike</b> &lt;<a href="mailto:d.maleike@dkfz-heidelberg.de">d.maleike@dkfz-heidelberg.de</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi list,<br><br>at the moment I&#39;m stuck at my memory limits. I need a multi-resolution<br>pyramid for some algorithm and the calculation takes up too much memory<br>during the update (and just during the update, afterwards it&#39;s fine again).
<br><br>I found the note &quot;This filter supports streaming&quot; in the documentation of<br>itk::RecursiveMultiResolutionPyramidImageFilter and would like to use that.<br><br>I tried to reuse the code from<br>itkRecursiveMultiResolutionPyramidImageFilterTest.cxx
, which uses the<br>itk::StreamingImageFilter to do what I want, but it calculates only ONE of<br>several outputs of the multi-resolution filter.<br><br>For my application I need all outputs of the multi-resolution filter, so I
<br>adapted the test code to this:<br><br><br><br><br>typedef itk::RecursiveMultiResolutionPyramidImageFilter&lt;ImageType, ImageType&gt; MRFilterType;<br>MRFilterType::Pointer m_MRFilter = MRFilterType::New();<br><br>typedef itk::StreamingImageFilter&lt;ImageType, ImageType&gt; MRStreamerType;
<br>MRStreamerType::Pointer m_MRStreamer = MRStreamerType::New();<br><br>//...<br><br>m_MRFilter-&gt;SetInput( input );&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// is a valid image<br>m_MRFilter-&gt;SetSchedule( mrSchedule ); // good schedule, works without streaming
<br><br>for (unsigned int idx = 0; idx &lt; numResolutions - 1; ++idx)&nbsp;&nbsp;// numResolutions corresponds to the above schedule<br>{<br>&nbsp;&nbsp;m_MRStreamer-&gt;SetInput( idx, m_MRFilter-&gt;GetOutput(idx) );<br>}<br><br>m_MRStreamer-&gt;SetNumberOfStreamDivisions( 8 );
<br>m_MRStreamer-&gt;Update();<br><br><br><br><br>Unfortunately the StreamingImageFilter has only one output after calling<br>Update().<br><br>Streaming is new for me and I only have some basic understanding of the<br>internals of the ITK pipeline, so maybe I just missed something very
<br>obvious. Or is it that the StreamingImageFilter just works with one input<br>and one output? I could not find any usage example except the test.<br><br>Could anyone help me or point me to some documentation / source code?
<br><br>Kind regards<br>Daniel<br><br>PS: I&#39;m using ITK 3.0 on Linux<br><br>--<br>Dipl.-Inform. Med. Daniel Maleike&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Phone: +49 6221 42 2326<br>Deutsches Krebsforschungszentrum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Im Neuenheimer Feld 280, 69120 Heidelberg
<br>Div. Medical and Biological Informatics (E130)&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://mbi.dkfz-heidelberg.de">http://mbi.dkfz-heidelberg.de</a><br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">
Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div><br><br clear="all"><br>