Re: Creating a Image from a text file
Posted by
dscho on
URL: http://imagej.273.s1.nabble.com/Creating-a-Image-from-a-text-file-tp3687257p3687258.html
Hi,
On Sun, 15 Aug 2010, Michael Grace wrote:
> I would like to create an image from an outputted text file. The text file contains the following header information followed by comma separated data.
>
> Line 1 File type and version
> Line 2 The date and time the file was created, and the documentation number. The date format is
> MMM DD YYYY. The time format is hh:mm:ss
> Line 3 Patient Identifier
> Line 4 Plane orientation (Transverse, Sagittal, Coronal) and
> the slice location (cm)
> Line 5 Dose units and normalized value
> Line 6 NA
> Line 7 NA
> Line 8 NA
> Line 9 Output area width and length (mm).
> Line 10 NA
> Line 11 NA
> Line 12 NA
> Line 13 The position of the upper left hand corner of the matrix, in calculation volume coordinates
> Line 14 The resolution of the calculation matrix in mm (x, y, z)
> Line 15 Number of points in the x and y directions
> Line 16 2-D planar array resolution in mm
>
> Line 17 onwards.... the image data.. eg. 100.2,100.4,98.6,92.1,.......
There is File>Import>Text Image..., but it expects a different format. So
I am afraid that you will have to do some coding to handle your exact
needs.
If your Java-fu is good, the source code for aforementioned menu item
might serve as an example:
http://rsbweb.nih.gov/ij/developer/source/ij/plugin/TextReader.java.htmlCiao,
Johannes