<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hello,
<div class=""><br class="">
</div>
<div class="">To the best of my knowledge and experience with the ITK pipeline, when the output of a filter ( H or R ) is used as multiple inputs with the ReleaseData, the data from the output ( H or R ) will be release after _each_ filter which use that output
 data. So the result is that the minimal amount of memory is consumed! But in a complex pipeline like yours filters will be executed multiple times for a single update.</div>
<div class=""><br class="">
</div>
<div class="">Based on your comments you likely want to set only R and W to ReleaseData automatically. This ensures that all the inputs to M are cached and available. The trade off is that R will get execute twice. Alternatively, you could just manually release
 the output of R after execution.</div>
<div class=""><br class="">
</div>
<div class="">HTH,</div>
<div class="">Brad</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Apr 22, 2017, at 12:46 PM, asertyuio via Insight-users <<a href="mailto:insight-users@itk.org" class="">insight-users@itk.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<div markdown-here-wrapper-content-modified="true" style="" class="markdown-here-wrapper" data-md-url="Thunderbird">
<p style="margin: 0px 0px 1.2em ! important;" class="">Dear Users,</p>
<p style="margin: 0px 0px 1.2em ! important;" class="">I have trouble applying the concepts behind the release data flag, and memory management  of itk to a particular problem.</p>
<p style="margin: 0px 0px 1.2em ! important;" class="">I’m developing a filter with, for part of it, it a rather complex mini pipeline.<br class="">
H, R, RS, W, WS and M are itk filters.<br class="">
The filter will be updated frequently, and I’m trying to make the update only update necessary parts, while keeping memory imprinting as low as possible.</p>
<p style="margin: 0px 0px 1.2em ! important;" class="">Here is a schematic, simplified graph representing my filter :</p>
<pre style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;font-size: 1em; line-height: 1.2em;margin: 1.2em 0px;" class=""><code style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;white-space: pre; overflow: auto; border-radius: 3px; border: 1px solid rgb(204, 204, 204); padding: 0.5em 0.7em; display: block ! important;" class="">    H          
    | \
    v  \
    R   \    -> take as input a parameter P1 that do not change often
    |    \
   / \   /\
  v   v v  |
 RS    W   |
  |    |   |
  |    v   |
   \  WS   |   
    \  |  /
     v v v
       M     -> takes parameters P2 that are often updated
</code></pre>
<p style="margin: 0px 0px 1.2em ! important;" class="">I would like to be able to release the output data of the filter R and of the filter W, updating them only if the parameter P1 change (which would trigger update for the whole pipeline), while still being
 able to change P2 without having to recalculate R, W and RS.</p>
<p style="margin: 0px 0px 1.2em ! important;" class="">I think it may be possible with the releaseData flag, don’t really understand where it should be putted, and if this will do what I need.</p>
<p style="margin: 0px 0px 1.2em ! important;" class="">Thanks a lot for you help !<br class="">
Yann</p>
<div title="MDH:RGVhciBVc2Vycyw8YnI+PGJyPkkgaGF2ZSB0cm91YmxlIGFwcGx5aW5nwqAgdGhlIGNvbmNlcHRzIGJlaGluZCB0aGUgcmVsZWFzZSBkYXRhIGZsYWcsIGFuZCBtZW1vcnkgb2YgaXRrIHRvIGEgcGFy
dGljdWxhciBwcm9ibGVtLjxicj48YnI+SSdtIGRldmVsb3BpbmcgYSBmaWx0ZXIgd2l0aCwgZm9y
IHBhcnQgb2YgaXQsIGl0IGEgcmF0aGVyIGNvbXBsZXggbWluaSBwaXBlbGluZS48YnI+SCwgUiwg
UlMsIFcsIFdTIGFuZCBNIGFyZSBpdGsgZmlsdGVycy48YnI+VGhlIGZpbHRlciB3aWxsIGJlIHVw
ZGF0ZWQgZnJlcXVlbnRseSwgYW5kIEknbSB0cnlpbmcgdG8gbWFrZSB0aGUgdXBkYXRlCiBvbmx5
IHVwZGF0ZSBuZWNlc3NhcnkgcGFydHMsIHdoaWxlIGtlZXBpbmcgbWVtb3J5IGltcHJpbnRpbmcg
YXMgbG93IGFzIApwb3NzaW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PGJyPkkgdGhpbmsgaXQgbWF5
IGJlIHBvc3NpYmxlIHdpdGggdGhlIHJlbGVhc2VEYXRhIGZsYWcsIGRvbid0IHJlYWxseSB1bmRl
cnN0YW5kIHdoZXJlIGl0IHNob3VsZCBiZSBwdXR0ZWQsIGFuZCBpZiB0aGlzIHdpbGwgZG8gd2hh
dCBJIG5lZWQuPGJyPjxicj5UaGFua3MgYSBsb3QgZm9yIHlvdSBoZWxwICE8YnI+WWFubjxicj7C
        oDxicj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0;" class="">
​</div>
</div>
</div>
_____________________________________<br class="">
Powered by <a href="http://www.kitware.com" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at<br class="">
<a href="http://www.kitware.com/opensource/opensource.html" class="">http://www.kitware.com/opensource/opensource.html</a><br class="">
<br class="">
Kitware offers ITK Training Courses, for more information visit:<br class="">
http://www.kitware.com/products/protraining.php<br class="">
<br class="">
Please keep messages on-topic and check the ITK FAQ at:<br class="">
http://www.itk.org/Wiki/ITK_FAQ<br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
http://public.kitware.com/mailman/listinfo/insight-users<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>