Posted by
CARL Philippe (LBP) on
Jul 08, 2015; 10:26pm
URL: http://imagej.273.s1.nabble.com/How-to-fill-a-selection-with-a-different-color-while-still-keep-the-line-color-tp5013457p5013475.html
Dear Ping,
Please try the following macro:
run("Clown (14K)");
makeOval(149, 58, 69, 44);
setForegroundColor(0, 0, 255);
run("Fill", "slice");
setForegroundColor(70, 255, 0);
run("Draw");
run("Select None");
makePolygon(54,30,85,32,94,41,101,51,99,58,81,58,63,54,60,46);
setForegroundColor(255, 57, 0);
run("Fill", "slice");
run("Select None");
run("Restore Selection");
setForegroundColor(255, 255, 0);
run("Draw");
run("Select None");
It downloads the clown picture,
then draws an oval ROI that is filled with blue and its bondary with green
then it draws a polygonal ROI that is filled with red, its selection deselected and selected again and the ROI boundary drawn in yellow.
Isn't this what you are looking for ?
My best regards,
Philippe
Le Mercredi 8 Juillet 2015 18:20 CEST, WangPing <
[hidden email]> a écrit:
> Dear Philippe,
>
> Thank you for your response, but my question is slightly different. I draw an ROI (for example an oval, or a polygon) it should have a color of its boundary. Then I fill the ROI with one color (press Y), then the ROI boundary disappears. My question was how to still display the boundary when the ROI is filled with some color.
>
> Best,
> Ping
>
> > Date: Wed, 8 Jul 2015 11:14:24 +0200
> > From:
[hidden email]
> > Subject: Re: How to fill a selection with a different color while still keep the line color?
> > To:
[hidden email]
> >
> > Dear Ping Wang,
> > I'm not sure whether I misunderstood what you are looking for.
> > But is the feature you are interested not just the Edit->Draw (or Ctrl + D)
> > feature.
> > It will draw a line which color is the active one and thickness can be
> > defined in Edit->Options->Line_width...
> > My best regards,
> > Philippe
> >
> > -----Message d'origine-----
> > De : ImageJ Interest Group [mailto:
[hidden email]] De la part de
> > WangPing
> > Envoyé : mardi 7 juillet 2015 21:07
> > À :
[hidden email]
> > Objet : How to fill a selection with a different color while still keep the
> > line color?
> >
> > Dear List,
> >
> > I drew an ROI with red color, now I filled it with a different color (for
> > example green), then I found the red boundary line of the ROI was not shown
> > any more. I wonder if anyone knows how to keep the line color for the ROI?
> > Thanks.
> > ping wang
> >
> >
> > --
> > ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> >
> > --
> > ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html