Login  Register

Copying Specified part of a Text File.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Copying Specified part of a Text File.

RhodW
Hi Listers,

 

I was wondering if there is a way of copy specifics parts of a text file
(defined as line and columns) to output them into a results after
performing mathematical operations on them.

 

I am using the MultiStackReg plugin and saving the transforms that's it
produces, these are saved as a text file. I want to extract the
transforms to perform calculations.

 

Any help much appreciated

 

Rhod

 



-----
Sunday Times Scottish University of the Year 2011-2013
Top in the UK for student experience
Fourth university in the UK and top in Scotland (National Student Survey 2012)

We invite research leaders and ambitious early career researchers to
join us in leading and driving research in key inter-disciplinary themes.
Please see www.hw.ac.uk/researchleaders for further information and how
to apply.

Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Copying Specified part of a Text File.

Rainer M. Engel
> I was wondering if there is a way of copy specifics parts of a text file
> (defined as line and columns) to output them into a results after
> performing mathematical operations on them.

Hey Rhod,

you can do this with the given macro functions of ImageJ.

Open that output you created:
http://rsbweb.nih.gov/ij/macros/OpenDialogDemo.txt

to split the file into lines:
lines=split(str,"\n")

There are more things to read here:
http://rsbweb.nih.gov/ij/developer/macro/functions.html

Maybe you want to create substrings of your wanted segments and store
these values in arrays for later calculations.

Best regards,
Rainer

--
Rainer M. Engel, Dipl. Digital Artist
scientific|Media GbR
Pichelsdorferstr. 143
D-13595 Berlin

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html