Login  Register

Re: draw a vertical line - malfunctioning??

Posted by Rewald, Boris on Dec 28, 2007; 5:08pm
URL: http://imagej.273.s1.nabble.com/Plugin-announcement-Orientation-measurements-tp3697674p3697682.html

Hi,

With me, drawing vertical lines still did not work manually!! Maybe it is my
fault!

But I found a work-around by filling a small retangle.
Please allow me one last question ...

How can I  transform all pictures in a current file? ... run("Open next") did
not work ...

What I have (for one file)..

open("D:\\DrArbeit\\Rhizoskopie\\Analysierte Bilder\\Ab\\Versuch
Linie\\AbEiDa_T008_L000_01.09.2006_1200_014_Bor.JPG");
makeRectangle(408, 4, 12, 3176);
run("Fill");
makeRectangle(1504, 4, 12, 3168);
run("Fill");
saveAs("Jpeg", "D:\\DrArbeit\\Rhizoskopie\\Analysierte Bilder\\Ab\\Versuch
Linie\\NEU\\AbEiDa_T008_L000_01.09.2006_1200_014_Bor.jpg");

close();




Thanks a lot in advance!
All the best,

Boris






-----------------------------------------------
Boris Rewald
Georg-August University of Göttingen, Germany
Albrecht-von-Haller Institute of Plant Sciences
Dept. of Plant Ecology
 
Grisebachstraße 1
D-37077 Göttingen, Germany
Phone: +49-(0)551-397084
Fax: +49-(0)551-392029
-----------------------------------------------

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gabriel
Landini
Sent: Friday, December 28, 2007 4:45 PM
To: [hidden email]
Subject: Re: draw a vertical line - malfunctioning??

On Friday 28 December 2007, Rewald, Boris wrote:
> It is not possible to create a vertical line (straight line function,
> 90°) with the "Draw" (Strg D) function, but i can draw circles, freehand
ect ...
> Is this a bug or normal?

Hi,

Not sure what is the "Draw" (Strg D) function.
I think that you may be applying the wrong functions.

Have a look at:
http://rsbweb.nih.gov/ij/developer/macro/functions.html


I think that you need:

drawLine(x1, y1, x2, y2)
 Draws a line between (x1, y1) and (x2, y2). Use setColor() to specify the
color of the line and setLineWidth() to vary the line width.

or

makeLine(x1, y1, x2, y2)
 Creates a new straight line selection. The origin (0,0) is assumed to be the
upper left corner of the image. Coordinates are in pixels. With ImageJ 1.35b
and letter, you can create segmented line selections by specifying more than
two coordinate, for example makeLine(25,34,44,19,69,30,71,56).

or

makeLine(x1, y1, x2, y2, lineWidth)
 Creates a straight line selection with the specified width. Requires 1.38u.
See also: getLine.

Cheers,

G.