Hi,
I am trying to get the r, theta, and value that are displayed on the status bar when a mouse cursor is on a certain area on the FFT image. I know that the getFFTLocation() (in ImagePlus) contains the equation for the radius but it depends on the cursor location. So I wrote the following code in order not to have this dependency:
for(int i =0; i< 256; i++){
for(int y =0; y< 256; y++){
//image.getPixel(i, y);
String x = image.getLocationAsString(i, y);
String n = image.getValueAsString(i, y);
System.out.print(x);
System.out.print(n);
System.out.println();
}
}
The image is a 256x256 matrix, so I put it into a for loop to get every point in the image. Its prints out the r, theta, and value (as shown below) but I don’t know if I have done this correctly. It also prints the value for every second r and theta value. I don’t know why this is happening.
……...
r=1.38 mm/c (174), theta= 315.93°
r=1.38 mm/c (174), theta= 315.93°, value=52
r=1.37 mm/c (175), theta= 315.70°
r=1.37 mm/c (175), theta= 315.70°, value=55
r=1.37 mm/c (175), theta= 315.46°
r=1.37 mm/c (175), theta= 315.46°, value=69
r=1.36 mm/c (176), theta= 315.23°
r=1.36 mm/c (176), theta= 315.23°, value=54
r=1.36 mm/c (177), theta= 315.00°
……..
If anyone could tell me if I am on right track or not, it would greatly appreciated.
Thank you.
Mariam Dost
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html