Best path to take

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

Best path to take

Robert Lockwood
Johannes, thanks for your help with my initial attempt to write a plugin.

Before I proceed I am asking you and others in the group for some advice.

My situation is that we are developing a camera system for in house
infrared photography, primarily of wild fires.  At this point I need to be
able to provide a way for others to view our image data and thought that
Fiji would be a good solution.

I've decided that our images will all have a metadata header and the first
24 bytes would be identical in function.  Our image data is all (C-talk
here) unsigned shorts with the 12-14 bits of precision depending on the
camera and are monochrome.

The size varies greatly among the cameras with a probable minimum of 512
lines by 640 pixels up to 11 megapixels.  The image data for most of the
cameras are very low contrast unless fire is in the image and consist of
raw DN values.

The common part of the header, the minimum information for the image to be
displayed, is"  Offset-to-image-data, number-of-lines,
number-of-samples-per-line, pixel-size, and time-of-acquisition (Java date
time in ms).  The first four data are Java ints, and the time is a Java
long for a total of 24 bytes.

I'd like to tell the few people who need to view the images to just
download and install Fiji on their LINUX, Macs, and Windows machines, and
then how to load and use the plugin/macro I supply.  The object is for the
user to use Fiji to browse and display  our  files (possible extension
.rawimage) and not need to enter any image metadata as they may not know
those data.  Once the image is in Fiji it can be manipulated, saved-as,
etc.  In essence it should work analogous to importing a raw image without
needing to input metadata by hand.

TIA for any insight, pointers, etc.

Nate

--
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
|

Fwd: Best path to take

Robert Lockwood
>> Why not just save the images in TIFF format? Why invent another file
format?


When I saw that I could save the files as TIFF I gave it a try but that
destroys the original data. What's is apparently saved is the image data,
that is, it's reduced to  BufferedImage.  That was a disappointing
exercise.

I know that it is possible for a TIFF file to have the original data in it
but AFAIK Fiji doesn't support writing this Scientific data mode, alas.

---------- Forwarded message ----------
From: Rasband, Wayne (NIH/NIMH) [E] <[hidden email]>
Date: Thu, Oct 10, 2013 at 1:08 PM
Subject: Re: Best path to take
To: Robert Lockwood <[hidden email]>


Dear Robert,

Why not just save the images in TIFF format? Why invent another file format?

Best regards,

-wayne


On Oct 10, 2013, at 3:29 PM, Robert Lockwood wrote:

> Johannes, thanks for your help with my initial attempt to write a plugin.
>
> Before I proceed I am asking you and others in the group for some advice.
>
> My situation is that we are developing a camera system for in house
> infrared photography, primarily of wild fires.  At this point I need to be
> able to provide a way for others to view our image data and thought that
> Fiji would be a good solution.
>
> I've decided that our images will all have a metadata header and the first
> 24 bytes would be identical in function.  Our image data is all (C-talk
> here) unsigned shorts with the 12-14 bits of precision depending on the
> camera and are monochrome.
>
> The size varies greatly among the cameras with a probable minimum of 512
> lines by 640 pixels up to 11 megapixels.  The image data for most of the
> cameras are very low contrast unless fire is in the image and consist of
> raw DN values.
>
> The common part of the header, the minimum information for the image to be
> displayed, is"  Offset-to-image-data, number-of-lines,
> number-of-samples-per-line, pixel-size, and time-of-acquisition (Java date
> time in ms).  The first four data are Java ints, and the time is a Java
> long for a total of 24 bytes.
>
> I'd like to tell the few people who need to view the images to just
> download and install Fiji on their LINUX, Macs, and Windows machines, and
> then how to load and use the plugin/macro I supply.  The object is for the
> user to use Fiji to browse and display  our  files (possible extension
> .rawimage) and not need to enter any image metadata as they may not know
> those data.  Once the image is in Fiji it can be manipulated, saved-as,
> etc.  In essence it should work analogous to importing a raw image without
> needing to input metadata by hand.
>
> TIA for any insight, pointers, etc.
>
> Nate
>
> --
> When I was 12 I thought I would live forever.
> So far, so good.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html




--
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: Best path to take

ctrueden
Hi Robert,

> When I saw that I could save the files as TIFF I gave it a try but
> that destroys the original data. What's is apparently saved is the
> image data, that is, it's reduced to  BufferedImage.

Can you clarify what you mean by "original data"? Usually when people say
that they are talking about the pixels, which you say were saved correctly.
Are you talking about metadata such as the time-of-acquisition you
mentioned? If so, what else? It is possible to embed these sorts of things
into a TIFF header.

Regards,
Curtis


On Thu, Oct 10, 2013 at 3:28 PM, Robert Lockwood <[hidden email]>wrote:

> >> Why not just save the images in TIFF format? Why invent another file
> format?
>
>
> When I saw that I could save the files as TIFF I gave it a try but that
> destroys the original data. What's is apparently saved is the image data,
> that is, it's reduced to  BufferedImage.  That was a disappointing
> exercise.
>
> I know that it is possible for a TIFF file to have the original data in it
> but AFAIK Fiji doesn't support writing this Scientific data mode, alas.
>
> ---------- Forwarded message ----------
> From: Rasband, Wayne (NIH/NIMH) [E] <[hidden email]>
> Date: Thu, Oct 10, 2013 at 1:08 PM
> Subject: Re: Best path to take
> To: Robert Lockwood <[hidden email]>
>
>
> Dear Robert,
>
> Why not just save the images in TIFF format? Why invent another file
> format?
>
> Best regards,
>
> -wayne
>
>
> On Oct 10, 2013, at 3:29 PM, Robert Lockwood wrote:
>
> > Johannes, thanks for your help with my initial attempt to write a plugin.
> >
> > Before I proceed I am asking you and others in the group for some advice.
> >
> > My situation is that we are developing a camera system for in house
> > infrared photography, primarily of wild fires.  At this point I need to
> be
> > able to provide a way for others to view our image data and thought that
> > Fiji would be a good solution.
> >
> > I've decided that our images will all have a metadata header and the
> first
> > 24 bytes would be identical in function.  Our image data is all (C-talk
> > here) unsigned shorts with the 12-14 bits of precision depending on the
> > camera and are monochrome.
> >
> > The size varies greatly among the cameras with a probable minimum of 512
> > lines by 640 pixels up to 11 megapixels.  The image data for most of the
> > cameras are very low contrast unless fire is in the image and consist of
> > raw DN values.
> >
> > The common part of the header, the minimum information for the image to
> be
> > displayed, is"  Offset-to-image-data, number-of-lines,
> > number-of-samples-per-line, pixel-size, and time-of-acquisition (Java
> date
> > time in ms).  The first four data are Java ints, and the time is a Java
> > long for a total of 24 bytes.
> >
> > I'd like to tell the few people who need to view the images to just
> > download and install Fiji on their LINUX, Macs, and Windows machines, and
> > then how to load and use the plugin/macro I supply.  The object is for
> the
> > user to use Fiji to browse and display  our  files (possible extension
> > .rawimage) and not need to enter any image metadata as they may not know
> > those data.  Once the image is in Fiji it can be manipulated, saved-as,
> > etc.  In essence it should work analogous to importing a raw image
> without
> > needing to input metadata by hand.
> >
> > TIA for any insight, pointers, etc.
> >
> > Nate
> >
> > --
> > When I was 12 I thought I would live forever.
> > So far, so good.
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
>
>
> --
> When I was 12 I thought I would live forever.
> So far, so good.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: Best path to take

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Robert Lockwood
On Oct 10, 2013, at 4:28 PM, Robert Lockwood wrote:

>>> Why not just save the images in TIFF format? Why invent
>>> another file format?
>
> When I saw that I could save the files as TIFF I gave it a try but that
> destroys the original data. What's is apparently saved is the image data,
> that is, it's reduced to  BufferedImage.  That was a disappointing
> exercise.
>
> I know that it is possible for a TIFF file to have the original data in it
> but AFAIK Fiji doesn't support writing this Scientific data mode, alas.

ImageJ can save 16-bit unsigned scientific data in TIFF format, including metadata (properties). Here is an example:

   int w=256, h=256;
   short[] data = new short[w*h];
   for (int i=0; i<w*h; i++)
      data[i] = (short)i;
   ImageProcessor ip = new ShortProcessor(w, h, data, null);
   ImagePlus imp = new ImagePlus("temp", ip);
   String properties = "key1: value1\nkey2: value2";
   imp.setProperty("Info", properties);
   IJ.saveAsTiff(imp, IJ.getDirectory("home")+"test.tiff");

To save using lossless compression, replace the IJ.saveAsTiff() call with:

   IJ.saveAs(imp, "zip", IJ.getDirectory("home")+"test.tiff");

Open and display the file using File>Open and display the metadata by typing "i" (Image>Show Info).

A plugin can open the TIFF file and retrieve the short data using:

   ImagePlus imp = IJ.openImage(path);
   ImageProcessor ip = imp.getProcessor();
   short[] data = (short[])ip.getPixels();

It can retrieve the metadata using:

   ImagePlus imp = IJ.openImage();
   String properties = imp.getProperty("Info");

-wayne


> ---------- Forwarded message ----------
> From: Rasband, Wayne (NIH/NIMH) [E] <[hidden email]>
> Date: Thu, Oct 10, 2013 at 1:08 PM
> Subject: Re: Best path to take
> To: Robert Lockwood <[hidden email]>
>
> Dear Robert,
>
> Why not just save the images in TIFF format? Why invent another file format?
>
> Best regards,
>
> -wayne
>
>
> On Oct 10, 2013, at 3:29 PM, Robert Lockwood wrote:
>
>> Johannes, thanks for your help with my initial attempt to write a plugin.
>>
>> Before I proceed I am asking you and others in the group for some advice.
>>
>> My situation is that we are developing a camera system for in house
>> infrared photography, primarily of wild fires.  At this point I need to be
>> able to provide a way for others to view our image data and thought that
>> Fiji would be a good solution.
>>
>> I've decided that our images will all have a metadata header and the first
>> 24 bytes would be identical in function.  Our image data is all (C-talk
>> here) unsigned shorts with the 12-14 bits of precision depending on the
>> camera and are monochrome.
>>
>> The size varies greatly among the cameras with a probable minimum of 512
>> lines by 640 pixels up to 11 megapixels.  The image data for most of the
>> cameras are very low contrast unless fire is in the image and consist of
>> raw DN values.
>>
>> The common part of the header, the minimum information for the image to be
>> displayed, is"  Offset-to-image-data, number-of-lines,
>> number-of-samples-per-line, pixel-size, and time-of-acquisition (Java date
>> time in ms).  The first four data are Java ints, and the time is a Java
>> long for a total of 24 bytes.
>>
>> I'd like to tell the few people who need to view the images to just
>> download and install Fiji on their LINUX, Macs, and Windows machines, and
>> then how to load and use the plugin/macro I supply.  The object is for the
>> user to use Fiji to browse and display  our  files (possible extension
>> .rawimage) and not need to enter any image metadata as they may not know
>> those data.  Once the image is in Fiji it can be manipulated, saved-as,
>> etc.  In essence it should work analogous to importing a raw image without
>> needing to input metadata by hand.
>>
>> TIA for any insight, pointers, etc.
>>
>> Nate
>>
>> --
>> When I was 12 I thought I would live forever.
>> So far, so good.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
>
>
> --
> When I was 12 I thought I would live forever.
> So far, so good.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

How to make a macro so as to list up the file (slice) name in the results window by Analyze Partivcles menu?

Tetsushi Koide
Hi, member,

We are mesureing partices with the menu:Analyze->Analyze Particles...

We are reading the  the menu: File->Import->Image sequence, and
then we apply some image processing.
Finally we mesure particle in the image sequence.

However, in "Results" file, the first colum is ID number of each particle
which is shown the drowing window.
We would like to add the filenames (slice names), which are shown
the "Summary window" in the menu:Analyze->Analyze Particles...
in the following way.

-------------------------------------------------
Current:
ID Area Mean Min Max
1 10 255 100 255
2 20 255 100 255
3 13 255 100 255
.
.
.
-------------------------------------------------
We wolud like to show:
File(Slice) ID Area Mean Min Max
XX-fram1 1 10 255 100 255
XX-fram2 2 20 255 100 255
XX-fram3 3 13 255 100 255
.
.
.
-------------------------------------------------

XX-frame# is the file name (slice name) for the input seaquence
and is shown in the Summay window.

Could you kindly show how to make a macro so as to list up
the file (slice) name in the results window by Analyze Partivcles menu?

Thank you in advance,

T. Koide

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