window manager specifics

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

window manager specifics

Nikos Katsikanis
Say I have 4 image plus objects open. how would I close 3 of them, without
closing the one I want?

To try and do this, I find that if I do the following they all close and
when the want I want to open again pops up, all the pixels are white

 
   ImagePlus keep = WindowManager.getImage(firstImageID);
   ImageProcessor i = keep.getProcessor();
   WindowManager.closeAllWindows();
    new ImagePlus("",i).show();
   
 
Reply | Threaded
Open this post in threaded view
|

plugin/macro for x-y-shift correction?

Michael Weber-4
Hello,

I have several multi-colour confocal images with a slight x-y-shift
between the channels. As a first step before re-align the system, is there
a plugin or a macro that allows me to correct this shift? It would mean to
shift a layer for a defined number of pixels.

Thanks in advance,
Michael
Reply | Threaded
Open this post in threaded view
|

Re: plugin/macro for x-y-shift correction?

Wayne Rasband
> I have several multi-colour confocal images with a slight x-y-shift
> between the channels. As a first step before re-align the system,
> is there a plugin or a macro that allows me to correct this shift?
> It would mean to shift a layer for a defined number of pixels.

Here is a macro that shifts the red, green or blue channel in an RGB
image by a specified number of pixels.

-wayne

   if (bitDepth!=24 || nSlices!=1)
       exit("RGB Image required");
   Dialog.create("RGB Shift");
   Dialog.addChoice("Channel:", newArray("Red", "Green", "Blue"));
   Dialog.addNumber("X Shift:", 10);
   Dialog.addNumber("Y Shift:", 10);
   Dialog.addCheckbox("Create New Image", true);
   Dialog.show();
   xshift = Dialog.getNumber();
   yshift = Dialog.getNumber();
   channel = Dialog.getChoice();
   create = Dialog.getCheckbox();
   setBatchMode(true);
   if (create) {
       setKeyDown("alt");
       run("Duplicate...");
   }
   run("RGB Stack");
   if (channel=="Green")
       setSlice(2);
   else if (channel=="Blue")
       setSlice(3);
   run("Select All");
   setBackgroundColor(0, 0, 0);
   run("Cut");
   makeRectangle(xshift, yshift, getWidth, getHeight);
   run("Paste");
   run("RGB Color");
   setBatchMode(false);
Reply | Threaded
Open this post in threaded view
|

Re: plugin/macro for x-y-shift correction?

Gabriel Landini
In reply to this post by Michael Weber-4
> I have several multi-colour confocal images with a slight x-y-shift
> between the channels. As a first step before re-align the system,
> is there a plugin or a macro that allows me to correct this shift?
> It would mean to shift a layer for a defined number of pixels.

I misread the message and missed the "channels" bit. I thought it was asking
for a registration/stitching plugins (which there are a few in the IJ site).

The plugin Align_RGB_planes may also help:

http://www.dentistry.bham.ac.uk/landinig/software/software.html

Cheers.

G.
Reply | Threaded
Open this post in threaded view
|

Re: plugin/macro for x-y-shift correction?

Michael Weber-4
The align_rgb plugin works fine as is exactly what I was looking for.

thanks,
Michael



>> I have several multi-colour confocal images with a slight x-y-shift
>> between the channels. As a first step before re-align the system,
>> is there a plugin or a macro that allows me to correct this shift?
>> It would mean to shift a layer for a defined number of pixels.
>
> I misread the message and missed the "channels" bit. I thought it was
> asking
> for a registration/stitching plugins (which there are a few in the IJ
> site).
>
> The plugin Align_RGB_planes may also help:
>
> http://www.dentistry.bham.ac.uk/landinig/software/software.html
>
> Cheers.
>
> G.
>


__________________________

Michael Weber (B.Sc.)
MPI-CBG Dresden, Light Microscopy Facility
phone: +49 351 2102837