Posted by
Gabriel Landini on
Feb 14, 2006; 10:18am
URL: http://imagej.273.s1.nabble.com/gel-analysis-tp3703740p3703741.html
On Tuesday 14 February 2006 08:29, Peter Frenzel wrote:
> Im analysing DGGE-gels but doing the numerical analysis (baseline
> subtraction, peak detection etc) externaly using R
> (
http://cran.r-project.org/).
Hm... I have been wondering about how to interface IJ with R. If you can give
some hints, I would be interested.
> (i) If the lanes are not perfectly perpendicular to the edge of the image,
> I rotate the image accordingly before analysis.
> A solution like that in Photoshop would
> be great (in Photoshop: draw any line with the Measure-Tool, do
> Image-Rotate-Arbitrary, and the deviation of the arbitrary from a
> horizontal line is offered as default for rotation).
This is quite easy:
First draw a line, then run this macro:
---------------------8<-----------------------
//Rotate_from_line.txt
//G. Landini 14/Feb/2006
//
// Rotates an image using a line selection as reference.
// The direction of the line selection is considered the "horizontal"
// and the image is rotated accordingly.
// The first point drawn on the line is considered the
// origin point to calculate the angle (so one line can produce 2
// different rotations depending on how it is drawn).
getLine(x1, y1, x2, y2,lineW);
if (x1!=-1){
a=-atan2( (y2-y1),(x2-x1))*(180/PI);
//print(a);
run("Arbitrarily...", "angle="+a+" interpolate fill");
}
---------------------8<-----------------------
Cheers,
Gabriel