Fixes to PNM/PGM/... reader/writer

Posted by Spencer Eugene Olson on
URL: http://imagej.273.s1.nabble.com/Fixes-to-PNM-PGM-reader-writer-tp3700640.html

Hi all,

I've added stack support to the PNM/PGM/... reader/writer.  For the NETPBM
format, stacks are simply stored as one fully formatted image (header and
all) concatenated right after the other in the same file.  I use the PGM
format quite often and hate having hundreds of files hanging around which are
really only slices in stacks of data.

I'd love to see this in future versions so that I don't have to keep replacing
it in the ij.jar file with my own.  And so that co-workers can open my PGM
stacks without having to get my updated ij.jar.  The attached java files are
changed with respect to those distributed with 1.37.  I've bracketed my
changes with something like /* BEGIN CHANGES \n author Spencer Olson */
and /* END CHANGES by Spencer Olson */ just so that it would be clear as too
which parts I changed.

ciao,

Spencer Olson

P.S.  As a side note, I think that it is time to change the labeling of "PGM"
to perhaps "PNM" in the "opener" menu (and other places?).  This would better
reflect the ability of ImageJ to read in other PNM formats.



--
------------
Spencer E. Olson
[hidden email]
http://www.umich.edu/~olsonse/
PGP Fingerprint: A452 312C 73DC 41EF 47F3  EE73 A898 B528 BAD2 0D0F
(See www.pgp.net or pgp.mit.edu for public keys to encrypt messages for me)

user, n.:
        The word computer professionals use when they mean "idiot."
                        -- Dave Barry, "Claw Your Way to the Top"
                         
[I always thought "computer professional" was the phrase hackers used
when they meant "idiot."  Ed.]

PGM_Reader.java (15K) Download Attachment
PNM_Writer.java (3K) Download Attachment