[IPython-User] ipython notebook help
Darren Govoni
darren@ontrenet....
Thu Jul 19 18:03:15 CDT 2012
Do any of the image processing cells in your image notebook (which is
great help btw!) implicitly leverage
ipython's parallel flows at all?
On Wed, 2012-07-18 at 16:49 -0500, MinRK wrote:
>
>
>
> On Wed, Jul 18, 2012 at 4:12 PM, Thomas Kluyver <takowl@gmail.com>
> wrote:
>
> Hi Darren,
>
>
> On 18 July 2012 22:01, Darren Govoni <darren@ontrenet.com>
> wrote:
> > 1) Is there a thorough tutorial on notebook? From hello
> world to the UI
> > features?
>
>
>
> There's a folder of example notebooks, including an
> introduction one.
> They may have come with your installation, depending on where
> you got
> it from, or you can get them here:
> https://github.com/ipython/ipython/tree/master/docs/examples/notebooks
>
>
> > 2) I want to do some image processing with it. Is there an
> example (or is it possible) > to interact with image data?
> e.g. run some ipython code, return/display the image result?
>
>
>
> It's certainly possible, although I don't know if there's an
> example
> yet. For simple cases, matplotlib has imread() and imshow()
> functions.
> Working with PIL might need a little integration, but
> hopefully just a
> few extra lines.
>
>
>
> Here is a notebook I made while trying to follow along with one of
> Fernando's Py4Science tutorials, which covered working with image
> data:
>
>
> https://gist.github.com/3139142
>
>
> It includes the code for automatically displaying PIL objects as
> images in the notebook, which I added later:
>
>
> from io import BytesIO
>
>
> def display_image(img, format='PNG'):
> fp = BytesIO()
> img.save(fp, format=format)
> return fp.getvalue()
>
>
> ip = get_ipython()
> png_formatter = ip.display_formatter.formatters['image/png']
> png_formatter.for_type_by_name('Image', 'Image', display_image)
>
>
> which we might want to have on by default.
>
>
> -MinRK
>
>
>
>
>
> Best wishes,
> Thomas
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120719/87320242/attachment.html
More information about the IPython-User
mailing list