Any interest in reading numpy arrays into ImageJ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Any interest in reading numpy arrays into ImageJ?

Nick Rubert
Hi listserve,

So scipy/numpy is a great open source package for performing matrix math and
manipulating images.  Currently, my method for getting numpy arrays into
imageJ is to use the imshow method and save the figure as a PNG.  However,
this adds a white border to my image along with axes to show the image
dimensions.  I've been looking for a way to write the floating point values
along with some header information to a file that I can open in ImageJ, and
then perform measurements with.  Ideally, ImageJ would automatically read in
the geometry information from the header.  Maybe the header info and the
numpy array could even be two separate files, as in the .mhd format provided
by ITK.

So, my question is, is anyone else working with numpy/ImageJ and has written
a plugin for reading in numpy arrays?  If not, can anyone point me to a
really thorough tutorial on how I'd go about writing such a plugin?

Thanks,

Nicholas Rubert
Reply | Threaded
Open this post in threaded view
|

Re: Any interest in reading numpy arrays into ImageJ?

suendermann
Hello Nick,

I'm using NumPy/SciPy with ImageJ, but I couldn't find any plugin
reading numpy matrices.
I usally save the NumPy Matrices as textfiles and use the ImageJ ->
Import Textfile option.

For better performance I would recommend the WrapITK-package to save
your matrix as a tiff file, which is easy to import to ImageJ.

Greetings
  Fred

Nick Rubert wrote:

> Hi listserve,
>
> So scipy/numpy is a great open source package for performing matrix math and
> manipulating images.  Currently, my method for getting numpy arrays into
> imageJ is to use the imshow method and save the figure as a PNG.  However,
> this adds a white border to my image along with axes to show the image
> dimensions.  I've been looking for a way to write the floating point values
> along with some header information to a file that I can open in ImageJ, and
> then perform measurements with.  Ideally, ImageJ would automatically read in
> the geometry information from the header.  Maybe the header info and the
> numpy array could even be two separate files, as in the .mhd format provided
> by ITK.
>
> So, my question is, is anyone else working with numpy/ImageJ and has written
> a plugin for reading in numpy arrays?  If not, can anyone point me to a
> really thorough tutorial on how I'd go about writing such a plugin?
>
> Thanks,
>
> Nicholas Rubert
>