2nd: Stigmation plugin or filter

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

2nd: Stigmation plugin or filter

Jim Quinn-3
ImageJ community -

In an attempt to demonstrate "stigmation" adjustment on a SEM (scanning
electron
microscope), for an on-line class, I am looking for a "stigmation plugin or
filter".

Since in "lock-down", I am looking for a "quick-fix" do demonstrate
astigmatism
in a previously collected 8-bit SEM image.

Meaning, I want to preferentially blur an image in the horizontal (X)
direction.

If that is possible, then I would also like to do that in the vertical (Y)
direction.

If that is possible, then doing that with "sliders" would be ideal.

Any ideas, suggestions, or links/URLs to previously posted work.

This does not need to be "technically correct".  I am looking for a
pseudo-astigmatism.

thanks and kind regards,

- Jim Quinn

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

Re: 2nd: Stigmation plugin or filter

Gabriel Landini
On Friday, 27 March 2020 19:54:50 GMT you wrote:
> Meaning, I want to preferentially blur an image in the horizontal (X)
> direction.
> If that is possible, then I would also like to do that in the vertical (Y)
> direction.

Hi,
You could make a stack where each slice is filtered with an increasingly
larger 1D convolution filter.
For example:
//--------------------
setBatchMode(true);
run("Boats (356K)");
for (i=0;i<50;i++){
  run("Duplicate...", "title="+i);
  selectWindow(i);
 run("Convolve...", "text1=[ 0 0 1 0 0\n0 0 1 0 0\n0 0 1 0 0\n0 0 1 0 0\n0 0 1
0 0] normalize");
}
run("Images to Stack", "name=Stack title=[] use");
setBatchMode(false);
//--------------------

So the stack slider should act like a "blurring control".
And do the same for a horizontal blur:

//--------------------
setBatchMode(true);
run("Boats (356K)");
for (i=0;i<50;i++){
 run("Duplicate...", "title="+i);
 selectWindow(i);
run("Convolve...", "text1=[ 0 0 0 0 0\n0 0 0 0 0\n1 1 1 1 1\n0 0 0 0 0\n0 0 0
0 0] normalize");
}
run("Images to Stack", "name=Stack title=[] use");
setBatchMode(false);
//--------------------

Mind the line brakes that the mailer imposes.

Cheers

Gabriel

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

Re: 2nd: Stigmation plugin or filter

Robert Dougherty
In reply to this post by Jim Quinn-3
 Jim,
Here is a macro that uses "Process/Filters/Gaussian Blur 3D...".
It is less general than Gabriel's version, but it may be possible to update the macro to work like that.

Bob

 requires("1.45f");
xsig = 5;
ysig = 5;
run("Copy");
while(true){
  Dialog.create("Blur x-y");
  Dialog.addSlider("X sigma:", 0, 256, xsig);
  Dialog.addSlider("Y sigma:", 0, 256,ysig);
   Dialog.show();
    xsig = Dialog.getNumber();
    ysig = Dialog.getNumber();
    run("Paste");
    run("Gaussian Blur 3D...", "x="+xsig+ " y="+ysig+" z=1");
}


    On Friday, March 27, 2020, 12:56:34 PM PDT, Jim Quinn <[hidden email]> wrote:  
 
 ImageJ community -

In an attempt to demonstrate "stigmation" adjustment on a SEM (scanning
electron
microscope), for an on-line class, I am looking for a "stigmation plugin or
filter".

Since in "lock-down", I am looking for a "quick-fix" do demonstrate
astigmatism
in a previously collected 8-bit SEM image.

Meaning, I want to preferentially blur an image in the horizontal (X)
direction.

If that is possible, then I would also like to do that in the vertical (Y)
direction.

If that is possible, then doing that with "sliders" would be ideal.

Any ideas, suggestions, or links/URLs to previously posted work.

This does not need to be "technically correct".  I am looking for a
pseudo-astigmatism.

thanks and kind regards,

- Jim Quinn

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

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