(no subject)

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

(no subject)

Robert Lockwood
I collect 16 bit unsigned (monochrome) data from cameras and encapsulate
the data in a ByteBuffer and then create BufferedImage.  Currently I can
only save the data as a "raw" file with no header and I'd like to save the
data losslessly in a recognized file format such as TIFF (or later as
GEO-TIFF).  I want my data acquisition program to convert and save
automatically.  I'm using LINUX.

It appears that the ImageJ code can be downloaded and used as a library.
1.    Is it available as a Java library or must I download the source code
and "compile" it to a jar file?

2.    Is it only available as a git project (I don't know git)?  I'm using
Eclipse Kepler.

Any help to get started would be very much appreciated.



--
When I was 12 I thought I would live forever.
So far, so good.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: your mail

dscho
Hi Robert,

On Wed, 25 Sep 2013, Robert Lockwood wrote:

> I collect 16 bit unsigned (monochrome) data from cameras and encapsulate
> the data in a ByteBuffer and then create BufferedImage.  Currently I can
> only save the data as a "raw" file with no header and I'd like to save the
> data losslessly in a recognized file format such as TIFF (or later as
> GEO-TIFF).  I want my data acquisition program to convert and save
> automatically.  I'm using LINUX.
>
> It appears that the ImageJ code can be downloaded and used as a library.
> 1.    Is it available as a Java library or must I download the source code
> and "compile" it to a jar file?

Every .jar file is a library first (which is really a .zip file with
certain conventions), and some of them are also executable .jar files (by
having a "Main-Class: xyz.ABC" line in the META-INF/MANIFEST.MF entry).

So: no need to recompile.

> 2.    Is it only available as a git project (I don't know git)?  I'm
> using Eclipse Kepler.

You can easily use Git without knowing it. But you can also drop the
ij.jar somewhere and ask Eclipse to use it as a dependency.

Your next questions are most likely:

Q: How do I save my BufferedImage?
A: You first need to wrap it into an ImagePlus:

        import ij.ImagePlus;
        ...
                ImagePlus imp = new ImagePlus("My image", bufferedImage);

   and then you need to use the IJ convenience class to save it:

        import ij.IJ;
        ...
                IJ.saveAs(imp, "TIFF", "/my/output/path.tiff");

Q: Where can I find documentation about the available classes?
A: You can see the current ImageJ 1.x' JavaDocs here:

        http://jenkins.imagej.net/job/ImageJ1-javadoc/javadoc/

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html