Hi Daniel,<br><br>Nice catch. The Streaming filter doesn'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's output. It does so just for the first output right now in lines 150-174 of
itkStreamingImageFilter.txx. 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't the superclass take care of that ? (In any case leaving them causes no harm, data isn'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> smoother->SetInput(..)<br> smoother->ReleaseDataFlagOn();<br> shrinker->SetInput(smoother->GetOutput())<br> shrinker->ReleaseDataFlagOn();<br> <br>HTH<br>--<br>karthik<br><br><br>On 3/2/07,
<b class="gmail_sendername">Daniel Maleike</b> <<a href="mailto:d.maleike@dkfz-heidelberg.de">d.maleike@dkfz-heidelberg.de</a>> 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'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's fine again).
<br><br>I found the note "This filter supports streaming" 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<ImageType, ImageType> MRFilterType;<br>MRFilterType::Pointer m_MRFilter = MRFilterType::New();<br><br>typedef itk::StreamingImageFilter<ImageType, ImageType> MRStreamerType;
<br>MRStreamerType::Pointer m_MRStreamer = MRStreamerType::New();<br><br>//...<br><br>m_MRFilter->SetInput( input ); // is a valid image<br>m_MRFilter->SetSchedule( mrSchedule ); // good schedule, works without streaming
<br><br>for (unsigned int idx = 0; idx < numResolutions - 1; ++idx) // numResolutions corresponds to the above schedule<br>{<br> m_MRStreamer->SetInput( idx, m_MRFilter->GetOutput(idx) );<br>}<br><br>m_MRStreamer->SetNumberOfStreamDivisions( 8 );
<br>m_MRStreamer->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'm using ITK 3.0 on Linux<br><br>--<br>Dipl.-Inform. Med. Daniel Maleike Phone: +49 6221 42 2326<br>Deutsches Krebsforschungszentrum Im Neuenheimer Feld 280, 69120 Heidelberg
<br>Div. Medical and Biological Informatics (E130) <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>