Login  Register

Re: importing Text Image files

Posted by Gabriel Landini on Oct 13, 2009; 7:09pm
URL: http://imagej.273.s1.nabble.com/importing-Text-Image-files-tp3690802p3690804.html

On Tuesday 13 October 2009 19:42:04 Chinn, Steve Dr CIV USA AMC wrote:
> The documentation says that Import-> Text Image works with tab-delimited
> text files. We have camera output that saves precise numerical data only
> in comma-delimited text format, which cannot be loaded into ImageJ
> without an intermediate format conversion step using another application
> (e.g. Excel, Igor Pro). I could not find an appropriate ImageJ plug-in
> on the web site. Does anyone have such a plug-in or simpler solution?
> Could this be added to ImageJ as a Text Image option?

Maybe you can write a macro that imports all the text file as one string and
then break it into smaller strings with:  split(string, delimiters).
Something like:

text = File.openAsString("");
lines = split(text,",");

so the "lines" array holds all your data. I have not tried this, though, so it
might not work.

Cheers

G.