<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>Thank you, Jim for clarifying.<br></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>Emma<br></span></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, March 28, 2014 12:56 PM, Jim Miller <millerjv@gmail.com> wrote:<br> </font> </div>  <div class="y_msg_container"><div id="yiv7713415597"><div><div>Setting LetContainerManageMemory is passing control over to ITK to manage the lifetime of that memory. You do not need to (and should not) call delete of the buffer you passed in. </div><div><br clear="none"></div><div>ExtractImageFilter will create a new image and a new buffer to hold the pixels of the extracted data. The lifetime of the original image will be managed by the SmartPointer. </div><div><br clear="none"></div><div> <br clear="none"><br clear="none">Jim</div><div class="yiv7713415597yqt1992199758" id="yiv7713415597yqt55078"><div><br clear="none">On Mar 28, 2014, at 3:43 PM, Emma Ryan <<a rel="nofollow" shape="rect" ymailto="mailto:eryanvtk@yahoo.com" target="_blank" href="mailto:eryanvtk@yahoo.com">eryanvtk@yahoo.com</a>> wrote:<br clear="none"><br
 clear="none"></div><blockquote type="cite"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"><div>Hi,</div><div><br clear="none"></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;">  If I declare a variable such as <br clear="none"></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"></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;">float *img = new float[500];</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"></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;">and pass 'img' to the import filter with the LetContainerManageMemory = true, then do I still need to</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"></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;">call delete [] img ?    Or will the filter take care of this ?. The documentation seems to imply
 that delete [] img will be called by ITK internally.  Just want to confirm this.<br clear="none"></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"></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;">Also, does the ExtractImageFilter create a new buffer for the extracted portion ? If so, do I need to clean up memory ?  Or will ITK smart pointers handle it ?</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"></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,</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;">Emma</div></div></div></blockquote></div><blockquote type="cite"><div><span>_____________________________________</span><br clear="none"><span>Powered by <a rel="nofollow" shape="rect" target="_blank" href="http://www.kitware.com/">www.kitware.com</a></span><br clear="none"><span></span><br clear="none"><span>Visit other Kitware open-source projects at</span><br clear="none"><span><a rel="nofollow" shape="rect" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br clear="none"><span></span><br clear="none"><span>Kitware offers ITK Training Courses, for more information visit:</span><br
 clear="none"><span><a rel="nofollow" shape="rect" target="_blank" href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a></span><br clear="none"><span></span><br clear="none"><span>Please keep messages on-topic and check the ITK FAQ at:</span><br clear="none"><span><a rel="nofollow" shape="rect" target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a></span><br clear="none"><span></span><br clear="none"><span>Follow this link to subscribe/unsubscribe:</span><br clear="none"><span><a rel="nofollow" shape="rect" target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a></span><br clear="none"></div></blockquote></div></div><br><br></div>  </div> </div>  </div> </div></body></html>