Re: [SciPy-User] FreeImage <-> numpy IO wrappers
Hey Zach On 12 May 2010 23:16, Zachary Pincus <zachary.pincus@yale.edu> wrote:
Hi all,
I'm definitely interested, having had several nightmarish attempts at making PIL play nice with my 16-bit TIFF data. I don't have a ton of spare time myself right now, but I'd like to give it a shot.
Wrappers attached. Currently, they try to load "FreeImage.[dll|dylib| so]" (depending on the platform) from the same directory as the module. This is of course easy to change.
I converted your wrappers to plugins for scikits.image. At the moment, it still segfaults---could you help me to iron out the problems? http://github.com/stefanv/scikits.image/tree/freeimage Cheers Stéfan
2010/5/13 Stéfan van der Walt <stefan@sun.ac.za>:
[...] I converted your wrappers to plugins for scikits.image. At the moment, it still segfaults---could you help me to iron out the problems?
(I mentioned this to Zach, but it may be of general interest to the imaging scikit developers as well, as another source of useful format information, if nothing else...) On a related note, we've been collaborating with the Bio-Formats project (http://www.loci.wisc.edu/software/bio-formats), and we have a wrapper for their library in CellProfiler (but it's not too difficult to use separately). This is probably *not* something for the majority of people, since it requires using a Java JNI wrapper (written in Cython). And using it to save images on the Mac is risky in GUI applications. Examining the bio-formats code can be useful when writing new format parsers, as well. Best, Ray
Hi Ray On 13 May 2010 18:00, Thouis (Ray) Jones <thouis@broadinstitute.org> wrote:
2010/5/13 Stéfan van der Walt <stefan@sun.ac.za>:
[...] I converted your wrappers to plugins for scikits.image. At the moment, it still segfaults---could you help me to iron out the problems?
(I mentioned this to Zach, but it may be of general interest to the imaging scikit developers as well, as another source of useful format information, if nothing else...)
On a related note, we've been collaborating with the Bio-Formats project (http://www.loci.wisc.edu/software/bio-formats), and we have a wrapper for their library in CellProfiler (but it's not too difficult to use separately). This is probably *not* something for the majority of people, since it requires using a Java JNI wrapper (written in Cython). And using it to save images on the Mac is risky in GUI applications.
Examining the bio-formats code can be useful when writing new format parsers, as well.
We've added a plugin framework for I/O so that we can easily add this sort of optional functionality. The more formats we can support the better! Would you like to integrate said code? The procedure is fairly straightforward: 1) Add a .ini file for the plugin. Format something like: [bio] description = Load x, y and z formats using the foo library. provides = imread, imsave 2) Add a bio_plugin.py file, and provide the functions imread and imsave. Regards Stéfan
As someone who has struggled with getting some proprietary microscope images into python I would love to see this get into scikits.image. The more coverage of formats I say the better given the flexibility of the plugin system. I would be willing to write some code or help test to help make the integration happen. Best, Jake B. 2010/5/13 Stéfan van der Walt <stefan@sun.ac.za>
Hi Ray
On 13 May 2010 18:00, Thouis (Ray) Jones <thouis@broadinstitute.org> wrote:
2010/5/13 Stéfan van der Walt <stefan@sun.ac.za>:
[...] I converted your wrappers to plugins for scikits.image. At the moment, it still segfaults---could you help me to iron out the problems?
(I mentioned this to Zach, but it may be of general interest to the imaging scikit developers as well, as another source of useful format information, if nothing else...)
On a related note, we've been collaborating with the Bio-Formats project (http://www.loci.wisc.edu/software/bio-formats), and we have a wrapper for their library in CellProfiler (but it's not too difficult to use separately). This is probably *not* something for the majority of people, since it requires using a Java JNI wrapper (written in Cython). And using it to save images on the Mac is risky in GUI applications.
Examining the bio-formats code can be useful when writing new format parsers, as well.
We've added a plugin framework for I/O so that we can easily add this sort of optional functionality. The more formats we can support the better! Would you like to integrate said code?
The procedure is fairly straightforward:
1) Add a .ini file for the plugin. Format something like:
[bio] description = Load x, y and z formats using the foo library. provides = imread, imsave
2) Add a bio_plugin.py file, and provide the functions imread and imsave.
Regards Stéfan
Hi Jake On May 13, 11:35 pm, jake bolewski <jakebolew...@gmail.com> wrote:
As someone who has struggled with getting some proprietary microscope images into python I would love to see this get into scikits.image. The more coverage of formats I say the better given the flexibility of the plugin system.
I would be willing to write some code or help test to help make the integration happen.
Wonderful, thanks! Maybe you and Ray can exchange ideas and create a branch on Github so long? Cheers Stéfan
participants (4)
-
jake bolewski
-
Stefan van der Walt
-
Stéfan van der Walt
-
Thouis (Ray) Jones