ome / bioformats

Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment. Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.
https://www.openmicroscopy.org/bio-formats
GNU General Public License v2.0
378 stars 241 forks source link

Please support multiple frames in PGM file format #3649

Open BarchSteel opened 3 years ago

BarchSteel commented 3 years ago

The PGM file format (http://netpbm.sourceforge.net/doc/pgm.html) allows for multiple frames in one file, called a sequence. The frames are just written, without gaps or padding, sequentially to the file. The number of frames in the file can be determined by the (fileSize - Header)/(size_of_one_frame)

If I open such a file in ImageJ, only the first frame is displayed. Please improve the PGM file reader, so it can read multiple frames as a sequence, just like the RAW importer does. sequence_3_frames_38x38px_8bit.zip

As a work-around, you can import the file using the "RAW" importer. For example, for the attached file, use uint8, size: 38x38 px, 3 frames.

Tested on ImageJ 1.53e with Bio-Format 6.5.1

link to source file: PGMReader.java

dgault commented 3 years ago

Hi @BarchSteel, thank you for raising the request and providing a sample file. You are correct that multi frame images are not yet supported in Bio-Formats. I will mark this as a feature request and it can be considered for future Bio-Formats releases.