Does frequency domain fitering of the speciified image @param imp The image to be filtered. @param filter The filter, 32-bits (0-1) or 8-bits (0-255) @see #forward @see #multiply @see #inverse
(ImagePlus imp, ImageProcessor filter)
| 188 | * @see #inverse |
| 189 | */ |
| 190 | public static void filter(ImagePlus imp, ImageProcessor filter) { |
| 191 | Object obj = imp.getProperty("FHT"); |
| 192 | FHT fht = obj!=null&&(obj instanceof FHT)?(FHT)obj:null; |
| 193 | if (fht!=null) { |
| 194 | FFT.multiply(imp, filter); |
| 195 | return; |
| 196 | } |
| 197 | ImagePlus imp2 = FFT.forward(imp); |
| 198 | FFT.multiply(imp2, filter); |
| 199 | imp.setProcessor(FFT.inverse(imp2).getProcessor()); |
| 200 | } |
| 201 | |
| 202 | /** Version of filter() that accepts an ImagePlus for the filter. */ |
| 203 | public static void filter(ImagePlus imp, ImagePlus filter) { |
no test coverage detected