Posted by
Frederic V. Hessman on
Apr 23, 2008; 9:37am
URL: http://imagej.273.s1.nabble.com/Re-Multi-image-FITS-file-tp3696394p3696395.html
On 19 Apr 2008, at 1:18 am, Leonard Sitongia wrote:
> There was a posting last year about this.
>
>> *From:* Soo Hoo Tom K CTR AFRL/DESM <[log in to unmask] <
https://list.nih.gov/cgi-bin/wa?LOGON=A2%3Dind0704%26L%3DIMAGEJ%26P%3DR6240%26I%3D-3
>> >> *Subject:* Multi image FITS file
>>
>> Does ImageJ support or is there a plugin available that opens a
>> multiple image FITS file, like SAOImage DS9's open 'FITS Multiple
>> Extension Data Cube' capability?
>>
> I'm interested in implementing a plugin to handle this. Tom
> McGlynn's FITS I/O library can handle this type of data cube, so I'm
> looking at using it.
>
> The obvious approach is to create an Image Sequence from the data
> cube. Is that reasonable? Is it consistent with how other plugins
> handle data cubes (are there any)? What about multiple headers? My
> FITS data cubes have one header extension for each image extension.
I've been playing with the idea of extending the standard FITS class
in ImageJ to cover the obvious cases. A strong constraint is the
handling of FITS header info in ImageJ: normal ImagePlus's have a copy
of the FITS header in the Info property and ImageStack's in the slice
label. This is certainly not an optimal solution, but can be made to
work (constant checking for images versus stacks and reading and
writing into the image info or stack label String). For instance, my
Astronomy plugin jar has a Fits class which will let you manipulate
FITS headers in ImagePlus's and ImageStack's as String arrays - simple
and crude, but effective. However, there's no non-plugin way to write
this info back to a file given that the default FITS writer ignores
the present FITS header, thus
- suggestion # 1: Make the default FITS writer at least write the
contents of the present FITS header for a simple ImagePlus (QUICK &
SIMPLE)
(otherwise one has to use a separate plugin).
Since Tom's nom.tam.fits package does all of this and more and since
he's adopted ImageJ for use by the stand-alone SkyView package, we
should ask Tom about adopting what he's done for use by normal ImageJ
users. The downside is forcing uses to insure that they've got a copy
of Tom's packages - since we're using ImageJ for school classes, the
fewer constraints we put on the use of ImageJ the better, so a native
ImageJ solution which is good enough for most ImageJ users would be
preferable.
- suggestion #2a: Extend the default FITS readers and writers to
handle the simplest multi-header-data-unit cases (DO-ABLE)
- suggestion #2b: Promise Tom a bottle of wine if he'll adapt his
nom.tam.* packages for normal ImageJ users (EASY FOR US TO SAY)
The other problem is that ImageJ still won't let you calibrate each of
the axes individually (the microscope assumption is that the 2-D
images have axes in the same physical space), whereas N-dimensional
FITS images can easily have N different axes. Taking care of this
problem would be a great future upgrade for ImageJ, since there are
people out there using ImageJ for things like sonograms and such. The
present calibration would be OK for 3-D images with one FITS header if
each axis had it's own unit (right now there's just a single, global
unit like "pixels") but certainly isn't prepared for multi-header FITS
images (I have no idea what TIFF images are like in this respect). If
only people doing astronomy are worried about this issue, then we'll
have to have separate plugins which read and write FITS headers and
which may get out-of-sync with the less-general Calibration.
- suggestion #3: Extend Calibration to handle independent axes
instead of the present historical mix of 2-D imaging and video-stacks
(NICE-TO-HAVE)
Rick
------------------------------------------------------------------------------------------------
Dr. Frederic V. Hessman
[hidden email]
Institut für Astrophysik Tel. +49-551-39-5052
Friedrich-Hund-Platz 1 Fax +49-551-39-5043
37077 Goettingen Room F04-133
http://www.Astro.physik.Uni-Goettingen.de/~hessman-------------------------------------------------------------------------------------------------
MONET: a MOnitoring NEtwork of Telescopes
http://monet.Uni-Goettingen.de-------------------------------------------------------------------------------------------------