Login  Register

Re: How to create symmetric selection in FFT image

Posted by Krs5 on Nov 28, 2013; 8:42am
URL: http://imagej.273.s1.nabble.com/How-to-create-symmetric-selection-in-FFT-image-tp5005720p5005722.html

Dear Jürgen

In my hands this works fine. If I add 'run("Make Inverse");' at the end of the code I end up with an inverted selection from the mirrored selection. Maybe you meant to use 'run("Invert");'?

Best wishes

Kees

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Jürgen Gluch
Sent: 27 November 2013 21:28
To: [hidden email]
Subject: How to create symmetric selection in FFT image

Does anyone know a macro/plugin code how to mirror a selection to make a symmetric selection in an FFT image for filtering?
I draw some circles on a FFT and want to get the corresponding circles on the other side of the image center.

I found this short macro from Jerome:

roiManager("Add");
getSelectionCoordinates(xs,ys);
m=getWidth()/2;
for (i=0;i<xs.length;i++) {
xs[i]=m-(xs[i]-m);
ys[i]=m-(ys[i]-m);
}
makeSelection ("polygon",xs,ys);
roiManager("Add");

which makes a corresponding ROI, but the ROI is not a selection and I can not run 'run("Make Inverse");' on it for example. So I am stuck here...
Please help me. Jürgen

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

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