<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello Brian,<div><br></div><div>You are correct that the sitk::Image does not currently have pickling implemented. I don't know if there is a simple work around to implement this method on the python end. But you can alway use the GetArrayFromImage, and GetImageFromArray methods to covert the images to and fro a numpy array. It's an extra copy but a work around for now.</div><div><br></div><div><br></div><div>What access to ITK's multithreading do you want? SimpleITK's image filters should default to being multithreaded just like ITK's. If you want to specify the number of threads a filter create by default the environmental variable "ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS" can be set before any code in SimpleITK is executed.</div><div><br></div><div>Brad</div><div><br><div><div>On Nov 30, 2012, at 12:50 PM, "Chapman, Brian" <<a href="mailto:brchapman@ucsd.edu">brchapman@ucsd.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif; ">
<div>
<div>I'm using SimpleITK for a script and want to exploit the multiple cores on a computer. I cannot use the Python multiprocessing library because the SimpleITK objects cannot be pickled:</div>
<div><br>
</div>
<div>PicklingError: Can't pickle <type 'SwigPyObject'>: attribute lookup __builtin__.SwigPyObject failed.</div>
<div><br>
</div>
<div>There doesn't seem to be any Python access to the multithreading features of the C++ class.</div>
<div><br>
</div>
<div>Any suggestions for an alternative approach?</div>
<div><br>
</div>
<div>Brian</div>
</div>
</div>
_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote></div><br></div></body></html>