<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>Thanks David for your reply.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span>I'll check allocateScalars() and also make sure this is the function used by my algorithm...</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span>Printing the memory address is of course a good
 check.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span>Thanks - Maarten</span></div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Friday, August 22, 2014 3:39:59 PM, David Gobbi <david.gobbi@gmail.com> wrote:<br> </font> </div>  <br><br> <div
 class="y_msg_container">Hi Maarten,<br clear="none"><br clear="none">The VTK image algorithms automatically reuse their memory unless the<br clear="none">data type or the size changes.  For more info, look at the code for<br clear="none">AllocateScalars in vtkImageData.cxx.  Also, I recommend printing out<br clear="none">the memory address after each Execute so that you can verify that it<br clear="none">doesn't change.<br clear="none"><br clear="none"> - David<br clear="none"><br clear="none"><div class="yqt0566956748" id="yqtfd66610"><br clear="none">On Fri, Aug 22, 2014 at 8:04 AM, Maarten Beek via vtkusers<br clear="none"><<a shape="rect" ymailto="mailto:vtkusers@vtk.org" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>> wrote:<br clear="none">> Hi all,<br clear="none">><br clear="none">> Is there a way to preserve the allocate memory of the put of an image<br clear="none">> algorithm?<br clear="none">><br
 clear="none">> Looking at the source code, I have the feeling that algorithms in vtk<br clear="none">> allocate memory for their output each time ExecuteData() is called. I<br clear="none">> created an image algorithm that updates almost continuously, but the image<br clear="none">> size doesn't change. So once the output is created and memory is allocated,<br clear="none">> I could just keep using this output (just calling output->Modified() after<br clear="none">> the data in the exiting memory is replaced). How would I do this?<br clear="none">><br clear="none">> Thanks - Maarten<br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>