<br><br><div class="gmail_quote">On Thu, Jul 19, 2012 at 6:03 PM, Darren Govoni <span dir="ltr">&lt;<a href="mailto:darren@ontrenet.com" target="_blank">darren@ontrenet.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<u></u>


  
  

<div>
Do any of the image processing cells in your image notebook (which is great help btw!) implicitly leverage<br>
ipython&#39;s parallel flows at all?<br></div></blockquote><div><br></div><div>Nope.  It&#39;s just a transcript of a demo doing basic work with images in numpy, matplotlib, and PIL.</div><div><br></div><div>The parallel code is not terribly hidden or implicit, so it should be apparent when it is in use.</div>

<div><br></div><div>For that, you should check out our <a href="https://github.com/ipython/ipython-in-depth">tutorial notebooks</a> from the presentation this week.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div class="im">
<br>
On Wed, 2012-07-18 at 16:49 -0500, MinRK wrote:<br>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
</div><div><div class="h5"><blockquote type="CITE">
    On Wed, Jul 18, 2012 at 4:12 PM, Thomas Kluyver &lt;<a href="mailto:takowl@gmail.com" target="_blank">takowl@gmail.com</a>&gt; wrote:<br>
    <blockquote>
        Hi Darren,
    </blockquote>
</blockquote>
<blockquote type="CITE">
    <blockquote>
        <br>
        On 18 July 2012 22:01, Darren Govoni &lt;<a href="mailto:darren@ontrenet.com" target="_blank">darren@ontrenet.com</a>&gt; wrote:<br>
        &gt; 1) Is there a thorough tutorial on notebook? From hello world to the UI<br>
        &gt; features?<br>
        <br>
        <br>
    </blockquote>
</blockquote>
<blockquote type="CITE">
    <blockquote>
        There&#39;s a folder of example notebooks, including an introduction one.<br>
        They may have come with your installation, depending on where you got<br>
        it from, or you can get them here:<br>
        <a href="https://github.com/ipython/ipython/tree/master/docs/examples/notebooks" target="_blank">https://github.com/ipython/ipython/tree/master/docs/examples/notebooks</a>
    </blockquote>
</blockquote>
<blockquote type="CITE">
    <blockquote>
        <br>
        &gt; 2) I want to do some image processing with it. Is there an example (or is it possible) &gt; to interact with image data? e.g. run some ipython code, return/display the image result?<br>
        <br>
        <br>
    </blockquote>
</blockquote>
<blockquote type="CITE">
    <blockquote>
        It&#39;s certainly possible, although I don&#39;t know if there&#39;s an example<br>
        yet. For simple cases, matplotlib has imread() and imshow() functions.<br>
        Working with PIL might need a little integration, but hopefully just a<br>
        few extra lines.
    </blockquote>
</blockquote>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
<blockquote type="CITE">
    Here is a notebook I made while trying to follow along with one of Fernando&#39;s Py4Science tutorials, which covered working with image data:
</blockquote>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
<blockquote type="CITE">
    <a href="https://gist.github.com/3139142" target="_blank">https://gist.github.com/3139142</a>
</blockquote>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
<blockquote type="CITE">
    It includes the code for automatically displaying PIL objects as images in the notebook, which I added later:
</blockquote>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
<blockquote type="CITE">
    from io import BytesIO
</blockquote>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
<blockquote type="CITE">
    def display_image(img, format=&#39;PNG&#39;):
</blockquote>
<blockquote type="CITE">
        fp = BytesIO()
</blockquote>
<blockquote type="CITE">
        img.save(fp, format=format)
</blockquote>
<blockquote type="CITE">
        return fp.getvalue()
</blockquote>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
<blockquote type="CITE">
    ip = get_ipython()
</blockquote>
<blockquote type="CITE">
    png_formatter = ip.display_formatter.formatters[&#39;image/png&#39;]
</blockquote>
<blockquote type="CITE">
    png_formatter.for_type_by_name(&#39;Image&#39;, &#39;Image&#39;, display_image)
</blockquote>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
<blockquote type="CITE">
    which we might want to have on by default.
</blockquote>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
<blockquote type="CITE">
    -MinRK
</blockquote>
<blockquote type="CITE">
    <br>
    <br>
</blockquote>
<blockquote type="CITE">
     
</blockquote>
<blockquote type="CITE">
    <blockquote>
        <br>
        Best wishes,<br>
        Thomas
    </blockquote>
</blockquote>
<blockquote type="CITE">
    <blockquote>
        _______________________________________________<br>
        IPython-User mailing list<br>
        <a href="mailto:IPython-User@scipy.org" target="_blank">IPython-User@scipy.org</a><br>
        <a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
        <br>
    </blockquote>
</blockquote>
<blockquote type="CITE">
    <br>
<pre>_______________________________________________
IPython-User mailing list
<a href="mailto:IPython-User@scipy.org" target="_blank">IPython-User@scipy.org</a>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a>
</pre>
</blockquote>
<br>
</div></div></div>

<br>_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
<br></blockquote></div><br>