Foreground image over Background image (placement)

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

Foreground image over Background image (placement)

Rainer M. Engel
I would like to know how to place a foreground image at the desired spot
above a background image.

For example this seems to be the default result....

newImage("BG", "8-bit white", 400, 300, 1);
newImage("FG", "8-bit black", 100, 50, 1);
run("Select All");
run("Copy");
selectWindow("BG");
run("Paste");
run("Select None");

... and my smaller foreground image is centered over the background image.

Is this typically done via Overlay > Add Image?

If yes I would think, that a single point selection (if existing in
target (BG)) could be used to position a foreground image when pasting.
By this the Overlay "detour" could be avoided.

Any thoughts, tips are welcome.

Best regards,
Rainer


--
Rainer M. Engel, Dipl. Digital Artist
scientific|Media GbR
Pichelsdorfer Str. 143
13595 Berlin

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

Re: Foreground image over Background image (placement)

Michael Schmid
Hi Rainer,

on the target image, can you create a selection with the exact dimensions of the image that you want to paste.  Then it will determine the position of the pasted image.

For doing it manually, after 'Select All' and 'Copy', select the target image, type Shift-E (Restore Selection), and move the selection to the desired location.

This also works when only part of the overlay image is selected, even with non-rectangular selections.

Michael
________________________________________________________________
On Mar 27, 2014, at 11:12, Rainer M. Engel wrote:

> I would like to know how to place a foreground image at the desired spot
> above a background image.
>
> For example this seems to be the default result....
>
> newImage("BG", "8-bit white", 400, 300, 1);
> newImage("FG", "8-bit black", 100, 50, 1);
> run("Select All");
> run("Copy");
> selectWindow("BG");
> run("Paste");
> run("Select None");
>
> ... and my smaller foreground image is centered over the background image.
>
> Is this typically done via Overlay > Add Image?
>
> If yes I would think, that a single point selection (if existing in
> target (BG)) could be used to position a foreground image when pasting.
> By this the Overlay "detour" could be avoided.
>
> Any thoughts, tips are welcome.
>
> Best regards,
> Rainer
>
>
> --
> Rainer M. Engel, Dipl. Digital Artist
> scientific|Media GbR
> Pichelsdorfer Str. 143
> 13595 Berlin
>
> --
> 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
|

Re: Foreground image over Background image (placement)

Rainer M. Engel
Thank you Michael for that tip. That is something in-between ;-)

Works. Great!

Rainer

Am 27.03.2014 11:51, schrieb Michael Schmid:

> Hi Rainer,
>
> on the target image, can you create a selection with the exact dimensions of the image that you want to paste.  Then it will determine the position of the pasted image.
>
> For doing it manually, after 'Select All' and 'Copy', select the target image, type Shift-E (Restore Selection), and move the selection to the desired location.
>
> This also works when only part of the overlay image is selected, even with non-rectangular selections.
>
> Michael
> ________________________________________________________________
> On Mar 27, 2014, at 11:12, Rainer M. Engel wrote:
>
>> I would like to know how to place a foreground image at the desired spot
>> above a background image.
>>
>> For example this seems to be the default result....
>>
>> newImage("BG", "8-bit white", 400, 300, 1);
>> newImage("FG", "8-bit black", 100, 50, 1);
>> run("Select All");
>> run("Copy");
>> selectWindow("BG");
>> run("Paste");
>> run("Select None");
>>
>> ... and my smaller foreground image is centered over the background image.
>>
>> Is this typically done via Overlay > Add Image?
>>
>> If yes I would think, that a single point selection (if existing in
>> target (BG)) could be used to position a foreground image when pasting.
>> By this the Overlay "detour" could be avoided.
>>
>> Any thoughts, tips are welcome.
>>
>> Best regards,
>> Rainer
>>
>>
>> --
>> Rainer M. Engel, Dipl. Digital Artist
>> scientific|Media GbR
>> Pichelsdorfer Str. 143
>> 13595 Berlin
>>
>> --
>> 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
Reply | Threaded
Open this post in threaded view
|

Re: Foreground image over Background image (placement)

ved sharma
In reply to this post by Rainer M. Engel
Hi Rainer,

How about using the built-in command, Insert...

newImage("BG", "8-bit white", 400, 300, 1);
newImage("FG", "8-bit black", 100, 50, 1);
run("Insert...", "source=FG destination=BG x=50 y=75");

Define x and y where you want to insert the FG image.

Ved

___________________________________
Ved Sharma, PhD
Department of Anatomy and Structural Biology
Albert Einstein College of Medicine
Bronx, New York

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