<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>Hi all,</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>Problem solved: De memory address of the scalars did change but because the ReleaseData flag was On...</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></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;">What would be best practice in a pipeline of about 6 image algorithms that all update during interaction: ReleaseData flag On or Off?</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></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;">(because that must have been the reason to put the flag to on a couple of months ago).<br></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></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;">Thanks - Maarten<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></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 4:31:14 PM, Maarten Beek via vtkusers <vtkusers@vtk.org> wrote:<br> </font> </div> <br><br> <div class="y_msg_container"><div id="yiv4766628558"><div><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 clear="none"><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 clear="none"><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="yiv4766628558qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv4766628558yqt4057280958" id="yiv4766628558yqt08789"><div class="yiv4766628558yahoo_quoted" style="display:block;"> <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 clear="none"> </font> </div> <br clear="none"><br clear="none"> <div class="yiv4766628558y_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="yiv4766628558yqt0566956748" id="yiv4766628558yqtfd66610"><br clear="none">On Fri, Aug 22, 2014 at 8:04 AM, Maarten Beek via vtkusers<br clear="none"><<a rel="nofollow" shape="rect" ymailto="mailto:vtkusers@vtk.org" target="_blank" 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 clear="none"><br clear="none"></div> </div> </div> </div></div> </div></div></div><br><div class="yqt4057280958"
id="yqt50679">_______________________________________________<br clear="none">Powered by www.kitware.com<br clear="none"><br clear="none">Visit other Kitware open-source projects at <a shape="rect" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br clear="none"><br clear="none">Please keep messages on-topic and check the VTK FAQ at: <a shape="rect" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br clear="none"><br clear="none">Follow this link to subscribe/unsubscribe:<br clear="none"><a shape="rect" href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br clear="none"></div><br><br></div> </div> </div> </div> </div></body></html>