once again...can i draw cylinders!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

once again...can i draw cylinders!

sridevi polavaram
I want to draw lines with width let's say 4. But i don't want it like a
solid line. I want to see it as a cylinder (i.e) line with width but no
fill....can i do that?
-Thanks
Sri
Reply | Threaded
Open this post in threaded view
|

Re: once again...can i draw cylinders!

lechristophe
once again : double click on the "Straight line selections" tool, set up
the slider to the number of pixels you want, and you're done.

Alternatively, you can get the selection dialog with "Edit/Otpions/Line
width..."

This works for straight lines, and the resulting ROI is still considered
as a line, not a surface, with subtle ways to process things like
intensities along the line, I think averaging in the direction
perpendicular to the line for each point - correct me if I'm wrong but I
seem to remember a discussion about that on the list.

sridevi polavaram wrote:
> I want to draw lines with width let's say 4. But i don't want it like a
> solid line. I want to see it as a cylinder (i.e) line with width but no
> fill....can i do that?
> -Thanks
> Sri
>
Reply | Threaded
Open this post in threaded view
|

Re: once again...can i draw cylinders!

sridevi polavaram
> solid line. I want to see it as a cylinder (i.e) hollow line with width
but no
> fill....can i do that?
like i posted, I don;t want solid lines...like how you said, i could draw
line with width but i don;t want the fill

On 10/25/06, Christophe Leterrier <[hidden email]> wrote:

>
> once again : double click on the "Straight line selections" tool, set up
> the slider to the number of pixels you want, and you're done.
>
> Alternatively, you can get the selection dialog with "Edit/Otpions/Line
> width..."
>
> This works for straight lines, and the resulting ROI is still considered
> as a line, not a surface, with subtle ways to process things like
> intensities along the line, I think averaging in the direction
> perpendicular to the line for each point - correct me if I'm wrong but I
> seem to remember a discussion about that on the list.
>
> sridevi polavaram wrote:
> > I want to draw lines with width let's say 4. But i don't want it like a
> > solid line. I want to see it as a cylinder (i.e) line with width but no
> > fill....can i do that?
> > -Thanks
> > Sri
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: once again...can i draw cylinders!

W. Chan
Let's see if this is what you want.  Sounds like you want a rectangle with
a certain line width.  Do Edit | Options | Colors... to select a
foreground color, Line Width... set to whatever you want, make a
rectangular selection and do Edit | Draw.  Deselect (Select None) ...

--
Pang (Wai Pang Chan, [hidden email], PAB A087, 206-685-1519)
The Biology Imaging Facility (http://staff.washington.edu/wpchan/if/)

On Wed, 25 Oct 2006, sridevi polavaram wrote:

>> solid line. I want to see it as a cylinder (i.e) hollow line with width
> but no
>> fill....can i do that?
> like i posted, I don;t want solid lines...like how you said, i could draw
> line with width but i don;t want the fill
>
> On 10/25/06, Christophe Leterrier <[hidden email]> wrote:
>>
>> once again : double click on the "Straight line selections" tool, set up
>> the slider to the number of pixels you want, and you're done.
>>
>> Alternatively, you can get the selection dialog with "Edit/Otpions/Line
>> width..."
>>
>> This works for straight lines, and the resulting ROI is still considered
>> as a line, not a surface, with subtle ways to process things like
>> intensities along the line, I think averaging in the direction
>> perpendicular to the line for each point - correct me if I'm wrong but I
>> seem to remember a discussion about that on the list.
>>
>> sridevi polavaram wrote:
>> > I want to draw lines with width let's say 4. But i don't want it like a
>> > solid line. I want to see it as a cylinder (i.e) line with width but no
>> > fill....can i do that?
>> > -Thanks
>> > Sri
>> >
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: once again...can i draw cylinders!

lechristophe
In reply to this post by sridevi polavaram
Sorry, my response was about ROI, not drawing.

First of all, ImageJ is not really a drawing program. Similar to
Photoshop, it can be incredibly difficult to draw the simplest things.
Plus you don't have the layer feature to avoid destroying your image. If
you just want to draw on images I suggest you use vector programs like
Illustrator (or it's open source competitor, Inkscape).

If I understand correctly, you want to draw rectangles with one pixel
borders and no fill ? That should correspond to "lines with width but no
fill".

I don't know how to do that with any line, but for horizontal or
vertical, you can do that :

- Select a rectangle ROI
- Store this ROI in the ROI manager (Edit/Selection/Add to ROI Manager)
- Shrink it by the number of pixels desired : one in this case with
Edit/Selection/Enlarge with -1
- Store the shrinked ROI,
- Substract the shrinked ROI from the inital ROI. To do that, select the
shrinked ROI, do a copy to the clipboard (Edit/Copy), select the initial
ROI, clear it (SUPR or Edit/Clear), and paste the shrinked ROI
(Edit/Paste) that will re-fill the inside of the rectangle with the
initial image, leaving just the one pixel frame.

For any kind of lines (inclined rectangles, even segmented or freehand),
a workaround using the macro provided yesterday by G. Landini but
defining two expanded ROIs one pixel appart and copy/pasting the inside
one could work.


Christophe

sridevi polavaram wrote:

>> solid line. I want to see it as a cylinder (i.e) hollow line with width
> but no
>> fill....can i do that?
> like i posted, I don;t want solid lines...like how you said, i could draw
> line with width but i don;t want the fill
>
> On 10/25/06, Christophe Leterrier <[hidden email]> wrote:
>>
>> once again : double click on the "Straight line selections" tool, set up
>> the slider to the number of pixels you want, and you're done.
>>
>> Alternatively, you can get the selection dialog with "Edit/Otpions/Line
>> width..."
>>
>> This works for straight lines, and the resulting ROI is still considered
>> as a line, not a surface, with subtle ways to process things like
>> intensities along the line, I think averaging in the direction
>> perpendicular to the line for each point - correct me if I'm wrong but I
>> seem to remember a discussion about that on the list.
>>
>> sridevi polavaram wrote:
>> > I want to draw lines with width let's say 4. But i don't want it like a
>> > solid line. I want to see it as a cylinder (i.e) line with width but no
>> > fill....can i do that?
>> > -Thanks
>> > Sri
>> >
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: once again...can i draw cylinders!

Wayne Rasband
In reply to this post by sridevi polavaram
To draw the outline of a wide straight line:

    1. Open the Line Width control by double clicking on the straight
line tool
    2. Use the straight line tool to create a line selection
    3. Use the slider in the Line Width control to vary the line width
    4. Draw an outline of the line by pressing "d" (Edit>Draw)
    5. Fill line line by pressing 'f" (Edit>Fill)

-wayne

On Oct 25, 2006, at 12:41 PM, sridevi polavaram wrote:

>> solid line. I want to see it as a cylinder (i.e) hollow line with
>> width
> but no
>> fill....can i do that?
> like i posted, I don;t want solid lines...like how you said, i could
> draw
> line with width but i don;t want the fill
>
> On 10/25/06, Christophe Leterrier <[hidden email]>
> wrote:
>>
>> once again : double click on the "Straight line selections" tool, set
>> up
>> the slider to the number of pixels you want, and you're done.
>>
>> Alternatively, you can get the selection dialog with
>> "Edit/Otpions/Line
>> width..."
>>
>> This works for straight lines, and the resulting ROI is still
>> considered
>> as a line, not a surface, with subtle ways to process things like
>> intensities along the line, I think averaging in the direction
>> perpendicular to the line for each point - correct me if I'm wrong
>> but I
>> seem to remember a discussion about that on the list.
>>
>> sridevi polavaram wrote:
>> > I want to draw lines with width let's say 4. But i don't want it
>> like a
>> > solid line. I want to see it as a cylinder (i.e) line with width
>> but no
>> > fill....can i do that?
>> > -Thanks
>> > Sri
>> >
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: once again...can i draw cylinders!

sridevi polavaram
>
>     1. Open the Line Width control by double clicking on the straight
> line tool
>     2. Use the straight line tool to create a line selection
>     3. Use the slider in the Line Width control to vary the line width
>     4. Draw an outline of the line by pressing "d" (Edit>Draw)


OK this is  what i  want.  But I want to acheive this programmatically.
I am developing a plugin that  helps visualizes lines by reading a input
file. let's say the file has:
12.0 39.0
23.0 34.0
it draws aline between the two points on the screen. FYI, I have nothing to
do with images or tracing.

Now, I want to draw a line using above 1-4 between the two coordinate points
instead of a plane line.
-Regards
Sri


    5. Fill line line by pressing 'f" (Edit>Fill)

>
> -wayne
>
> On Oct 25, 2006, at 12:41 PM, sridevi polavaram wrote:
>
> >> solid line. I want to see it as a cylinder (i.e) hollow line with
> >> width
> > but no
> >> fill....can i do that?
> > like i posted, I don;t want solid lines...like how you said, i could
> > draw
> > line with width but i don;t want the fill
> >
> > On 10/25/06, Christophe Leterrier <[hidden email]>
> > wrote:
> >>
> >> once again : double click on the "Straight line selections" tool, set
> >> up
> >> the slider to the number of pixels you want, and you're done.
> >>
> >> Alternatively, you can get the selection dialog with
> >> "Edit/Otpions/Line
> >> width..."
> >>
> >> This works for straight lines, and the resulting ROI is still
> >> considered
> >> as a line, not a surface, with subtle ways to process things like
> >> intensities along the line, I think averaging in the direction
> >> perpendicular to the line for each point - correct me if I'm wrong
> >> but I
> >> seem to remember a discussion about that on the list.
> >>
> >> sridevi polavaram wrote:
> >> > I want to draw lines with width let's say 4. But i don't want it
> >> like a
> >> > solid line. I want to see it as a cylinder (i.e) line with width
> >> but no
> >> > fill....can i do that?
> >> > -Thanks
> >> > Sri
> >> >
> >>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: once again...can i draw cylinders!

lechristophe
Sorry to have posted a spectacularily inacurate and complicated way to
do (badly) what you asked. Again Wayne is the master, I still have a lot
to learn.

I'll try to modestly propose a macro that does what Wayne explained, but
programatically. It is mostly based on the macro recorder. I don't know
what it would look like as a plugin.

macro "fatline" {
// exemple image and coordinates (this would be obtained from a file)
newImage("Untitled", "8-bit White", 100, 100, 1);
x1=20;
y1=20;
x2=80;
y2=80;
// defines width
W=5;
// traces the "fat line"
makeLine(x1, y1, x2, y2);
run("Line Width...", "line="+W);
run("Draw");
}

Christophe Leterrier


sridevi polavaram a écrit :

>>
>>     1. Open the Line Width control by double clicking on the straight
>> line tool
>>     2. Use the straight line tool to create a line selection
>>     3. Use the slider in the Line Width control to vary the line width
>>     4. Draw an outline of the line by pressing "d" (Edit>Draw)
>
>
> OK this is  what i  want.  But I want to acheive this programmatically.
> I am developing a plugin that  helps visualizes lines by reading a input
> file. let's say the file has:
> 12.0 39.0
> 23.0 34.0
> it draws aline between the two points on the screen. FYI, I have
> nothing to
> do with images or tracing.
>
> Now, I want to draw a line using above 1-4 between the two coordinate
> points
> instead of a plane line.
> -Regards
> Sri
>
>
>    5. Fill line line by pressing 'f" (Edit>Fill)
>>
>> -wayne
>>
>> On Oct 25, 2006, at 12:41 PM, sridevi polavaram wrote:
>>
>> >> solid line. I want to see it as a cylinder (i.e) hollow line with
>> >> width
>> > but no
>> >> fill....can i do that?
>> > like i posted, I don;t want solid lines...like how you said, i could
>> > draw
>> > line with width but i don;t want the fill
>> >
>> > On 10/25/06, Christophe Leterrier <[hidden email]>
>> > wrote:
>> >>
>> >> once again : double click on the "Straight line selections" tool, set
>> >> up
>> >> the slider to the number of pixels you want, and you're done.
>> >>
>> >> Alternatively, you can get the selection dialog with
>> >> "Edit/Otpions/Line
>> >> width..."
>> >>
>> >> This works for straight lines, and the resulting ROI is still
>> >> considered
>> >> as a line, not a surface, with subtle ways to process things like
>> >> intensities along the line, I think averaging in the direction
>> >> perpendicular to the line for each point - correct me if I'm wrong
>> >> but I
>> >> seem to remember a discussion about that on the list.
>> >>
>> >> sridevi polavaram wrote:
>> >> > I want to draw lines with width let's say 4. But i don't want it
>> >> like a
>> >> > solid line. I want to see it as a cylinder (i.e) line with width
>> >> but no
>> >> > fill....can i do that?
>> >> > -Thanks
>> >> > Sri
>> >> >
>> >>
>> >
>>
>