Importing textfiles of decimals?

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

Importing textfiles of decimals?

Steve Nanchy
I have many synthetic images exported as textfiles.  They are basically
formatted to be 512 ASCII decimal numbers wide x 512 high, and some are
tiled (therefore, multiples of 512 in either or both directions).  A
simple file starts off with a row of alphanumeric data of variable length
followed by 512 rows of 512 signed decimal numbers separated by tabs
(ddd.dddddd<tab>-dd.dddddd<tab>d.dddddd...).  Every row ends with a CR/LF
(&h0D &h0A).

It appears that IJ (running v1.42h on a Mac) imports many integer and real
formats; but has nothing to parse ASCII values.

Does anyone know of a macro or plugin or utility which can pull these into
ImageJ -or- convert them to an importable format?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Importing textfiles of decimals?

Harry Parker
Hi Steve,

Check the online ImageJ documentation for the File->Import->Text Image... command at
http://rsb.info.nih.gov/ij/docs/menus/file.html

 --
Harry Parker
Senior Imaging Systems Engineer







________________________________
From: Steve <[hidden email]>
To: [hidden email]
Sent: Tuesday, February 24, 2009 3:59:21 PM
Subject: Importing textfiles of decimals?

I have many synthetic images exported as textfiles.  They are basically
formatted to be 512 ASCII decimal numbers wide x 512 high, and some are
tiled (therefore, multiples of 512 in either or both directions).  A
simple file starts off with a row of alphanumeric data of variable length
followed by 512 rows of 512 signed decimal numbers separated by tabs
(ddd.dddddd<tab>-dd.dddddd<tab>d.dddddd...).  Every row ends with a CR/LF
(&h0D &h0A).

It appears that IJ (running v1.42h on a Mac) imports many integer and real
formats; but has nothing to parse ASCII values.

Does anyone know of a macro or plugin or utility which can pull these into
ImageJ -or- convert them to an importable format?

Thanks!



     
Reply | Threaded
Open this post in threaded view
|

Re: Importing textfiles of decimals?

Steve Nanchy
In reply to this post by Steve Nanchy
FOLLOWUP:

Long story short: I apparently had a funny 1.42h ij.jar file.  After
posting the original message I upgraded to 1.42j and
file/import/text_image worked fine.

Unfortunately though, I'd dropped the new .jar file into the ImageJ folder
without thinking about it, overwriting the old one - so I couldn't go back
and duplicate the error.  Then I downloaded a fresh copy of 1.42h and IT
worked properly (but I'm running 1.42j now).

I can only assume that the particular 1.42h I had was corrupt in some
small way. <shrug>