import ij.*; import ij.plugin.*; import ij.gui.*; import ij.process.*; import ij.measure.Calibration; /** This plugin does MRI t2 calculations (s2 = k/ln(s1/s2)) on two images or stacks. * * ERK (Eric Kischell, keesh@ieee.org) changes 11/27/99 * 8-bit enhancement * ERK changes 04/13/02 * Aded option to output to a new, third image/stack, rather * than overwriting the second (S2) stack. */ public class MRI_t2_Calculator implements PlugIn { private static String title = "MRI_t2_Calculator"; private static double k = 35.0; public void run(String arg) { int[] wList = WindowManager.getIDList(); if (wList==null || wList.length<2) { IJ.showMessage(title, "There must be at least two windows open."); return; } String[] titles = new String[wList.length]; for (int i=0; i