Login  Register

Re: FITS Format Support

Posted by Frederic V. Hessman on Jan 08, 2015; 10:12pm
URL: http://imagej.273.s1.nabble.com/FITS-Format-Support-tp5011134p5011141.html

Neither the ImageJ FITS library nor the Bio-Format libraries support multiple Header-Data-Units.  You could write your own ImageJ plugin using the nom.tam.fits library but I’ve usually simply used a pyfits script to transform the multiple HDU’s to multiple images or n-dimensional images, depending upon your needs (quite often, the multiple HDU’s are actually useless).

The new version of ImageJ should definitely be given better FITS support, e.g. via nom.tam.fits;  unforunately, the question of metadata hasn’t really been settled….

Rick

On 8 Jan 2015, at 14:59, Cayanan, Michael D (398G) <[hidden email]> wrote:

> Hi Curtis,
>
> Thanks for the Bio-Formats library recommendation. I was able to install
> it into the ImageJ library, but unfortunately, it does not appear to
> support FITS files that contain multiple images within them.
>
> I have a fits file with 2 HDUs, each describing an image (both 2-D
> images). Not sure if I'm overlooking one of the Bio-Formats settings or
> the menu options available through imageJ.
>
> I see that there are javadocs for this library, so I'll go through this to
> see if there is some sort of browse feature to support my use case.
>
> Thanks,
> Michael
>
>
> On 1/8/15 12:44 PM, "Curtis Rueden" <[hidden email]> wrote:
>
>> Hi Michael,
>>
>>> I have a FITS file containing 2 images within the file, but ImageJ
>>> looks like it only recognizes the first image. Is there a way to get
>>> to that second image?
>>
>> Did you try using Bio-Formats [1]? It supports multi-plane FITS files
>> (NAXIS3 > 1).
>>
>>> I have been using the ImageJ library
>>
>> Bio-Formats is usable as a standalone Java library [2] and also has an
>> ImageJ-compatible API (e.g., [3]).
>>
>> Regards,
>> Curtis
>>
>> [1] http://fiji.sc/Bio-Formats
>> [2]
>> http://openmicroscopy.org/info/bio-formats/developers/java-library.html
>> [3]
>> https://github.com/openmicroscopy/bioformats/blob/v5.0.6/components/bio-fo
>> rmats-plugins/utils/Simple_Read.java
>>
>> On Thu, Jan 8, 2015 at 12:44 PM, Cayanan, Michael D (398G) <
>> [hidden email]> wrote:
>>
>>> Hi,
>>>
>>> I have been using the ImageJ library to read FITS images and converting
>>> them to jpeg, gif, etc.
>>>
>>> I have a FITS file containing 2 images within the file, but ImageJ looks
>>> like it only recognizes the first image. Is there a way to get to that
>>> second image?
>>>
>>> Thanks in advance for your help,
>>> Michael
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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