MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / doComplexInverseTransform

Method doComplexInverseTransform

ij/src/main/java/ij/plugin/FFT.java:543–563  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

541 }
542
543 void doComplexInverseTransform() {
544 ImageStack stack = imp.getStack();
545 if (!stack.getSliceLabel(1).equals("Real"))
546 return;
547 int maxN = imp.getWidth();
548 swapQuadrants(stack);
549 float[] rein = (float[])stack.getPixels(1);
550 float[] imin = (float[])stack.getPixels(2);
551 float[] reout= new float[maxN*maxN];
552 float[] imout = new float[maxN*maxN];
553 c2c2DFFT(rein, imin, maxN, reout, imout);
554 ImageStack stack2 = new ImageStack(maxN, maxN);
555 swapQuadrants(stack);
556 stack2.addSlice("Real", reout);
557 stack2.addSlice("Imaginary", imout);
558 String name = WindowManager.getUniqueName(imp.getTitle().substring(10));
559 ImagePlus imp2 = new ImagePlus(name, stack2);
560 imp2 = unpad(imp2);
561 imp2.getProcessor().resetMinAndMax();
562 imp2.show();
563 }
564
565 private ImagePlus unpad(ImagePlus img) {
566 int width = (int)imp.getNumericProp("Original width");

Callers 1

runMethod · 0.95

Calls 15

getSliceLabelMethod · 0.95
swapQuadrantsMethod · 0.95
getPixelsMethod · 0.95
c2c2DFFTMethod · 0.95
addSliceMethod · 0.95
getUniqueNameMethod · 0.95
unpadMethod · 0.95
getProcessorMethod · 0.95
showMethod · 0.95
substringMethod · 0.80
getTitleMethod · 0.65
getStackMethod · 0.45

Tested by

no test coverage detected