Login  Register

New user of ImageJ has a question about inserting text on an image.

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

New user of ImageJ has a question about inserting text on an image.

Barry Stephens
Hello Everyone,
     I am new to this forum and new to using imageJ.  I can see it is a great program that has an infinite range of usage.  However, I just need to know how to post text on an imagine that is vertical instead of horizontal.  I know how to place a text on the image, I would just like to have that text vertical.  If there is a script I can write would someone out there help me with writing that script.  I am very new to everything so be gentle on me.  

Thank you,

Barry Stephens

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

Re: New user of ImageJ has a question about inserting text on an image.

ctrueden
Hi Barry,

> I just need to know how to post text on an imagine that is vertical
> instead of horizontal.

How about rotating the image ninety degrees left or right, writing the
text, and then rotating it back afterward?

Regards,
Curtis


On Wed, Jul 17, 2013 at 11:22 AM, Barry Stephens
<[hidden email]>wrote:

> Hello Everyone,
>      I am new to this forum and new to using imageJ.  I can see it is a
> great program that has an infinite range of usage.  However, I just need to
> know how to post text on an imagine that is vertical instead of horizontal.
>  I know how to place a text on the image, I would just like to have that
> text vertical.  If there is a script I can write would someone out there
> help me with writing that script.  I am very new to everything so be gentle
> on me.
>
> Thank you,
>
> Barry Stephens
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: New user of ImageJ has a question about inserting text on an image.

Jerome Mutterer-3
In reply to this post by Barry Stephens
Dear Barry,

Rotate your image in one direction, place your text, Rotate your image the
other direction.
Here is a macro example that does this:
Open a new macro with the Plugins>New>Macro command, then paste the
following:

newImage("Untitled", "RGB ramp", 300, 200, 1);
run("Rotate 90 Degrees Right");
setForegroundColor(255, 255, 255);
setFont("SansSerif", 18, " antialiased");
drawString("my text", 10, 30);
run("Rotate 90 Degrees Left");

Run the macro with CTRL-R.
Remove the new image statement to run it on your image.

Sincerely,

Jerome.


On 17 July 2013 18:22, Barry Stephens <[hidden email]> wrote:

> Hello Everyone,
>      I am new to this forum and new to using imageJ.  I can see it is a
> great program that has an infinite range of usage.  However, I just need to
> know how to post text on an imagine that is vertical instead of horizontal.
>  I know how to place a text on the image, I would just like to have that
> text vertical.  If there is a script I can write would someone out there
> help me with writing that script.  I am very new to everything so be gentle
> on me.
>
> Thank you,
>
> Barry Stephens
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: New user of ImageJ has a question about inserting text on an image.

Christopher Coulon-2
In reply to this post by Barry Stephens
> Hello Everyone,
>     I am new to this forum and new to using imageJ.  I can see it is a great program that has an infinite range of usage.  However, I just need to know how to post text on an imagine that is vertical instead of horizontal.  I know how to place a text on the image, I would just like to have that text vertical.  If there is a script I can write would someone out there help me with writing that script.  I am very new to everything so be gentle on me.  
>
> Thank you,
>
> Barry Stephens

Barry,

Here is one workaround:

        origIm = getImageID();
       
        run("Colors...", "foreground=black background=white selection=yellow");
        setTool("text");
        setFont("SansSerif", 18, " antialiased");
       
        ID = getImageID();
        title = "Type text";
        msg = "Type your text in the image\nthen click \"OK\".";
        waitForUser(title, msg);
        selectImage(ID);  
       
        run("Draw");
        run("Duplicate...", "title=[temp]");
        selectWindow("text test");
        run("Clear", "slice");
        run("Select None");
        selectWindow("temp");
        run("Rotate 90 Degrees Right");
        run("Select All");
        run("Copy");
        close();
        selectWindow("text test");
        run("Paste");

This can be adapted to your special needs for arbitrary rotation, adjustment of text style and size, etc.  

Chris Coulon





Christopher Coulon, Ph.D.
The GAIA Group
http://gaiag.net




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

PastedGraphic-2.tiff (114K) Download Attachment
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: New user of ImageJ has a question about inserting text on an image.

Barry Stephens
In reply to this post by ctrueden
Thank you to all who replied what a simple fix.  I feel silly now asking.
 Thanks a lot


On Wed, Jul 17, 2013 at 12:49 PM, Curtis Rueden <[hidden email]> wrote:

> Hi Barry,
>
> > I just need to know how to post text on an imagine that is vertical
> > instead of horizontal.
>
> How about rotating the image ninety degrees left or right, writing the
> text, and then rotating it back afterward?
>
> Regards,
> Curtis
>
>
> On Wed, Jul 17, 2013 at 11:22 AM, Barry Stephens
> <[hidden email]>wrote:
>
> > Hello Everyone,
> >      I am new to this forum and new to using imageJ.  I can see it is a
> > great program that has an infinite range of usage.  However, I just need
> to
> > know how to post text on an imagine that is vertical instead of
> horizontal.
> >  I know how to place a text on the image, I would just like to have that
> > text vertical.  If there is a script I can write would someone out there
> > help me with writing that script.  I am very new to everything so be
> gentle
> > on me.
> >
> > Thank you,
> >
> > Barry Stephens
> >
> > --
> > 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