import ij.plugin.*; import ij.*; import ij.gui.*; import ij.process.*; /** iMorph /* @author Hajime HIrase /* @version 0.1.1 /* modified from ImageCalculator plug-in **/ public class iMorph_ implements PlugIn { private static int operator; private static String title1 = ""; private static String title2 = ""; private static boolean createWindow = true; private int nFrame=10; public void run(String arg) { int[] wList = WindowManager.getIDList(); if (wList==null) { IJ.error("No windows are open."); return; } //IJ.register(iMorph_.class); String[] titles = new String[wList.length]; String[] operators = {"Linear"}; for (int i=0; i>16; fGre = (fromPixels[j]&0xff00)>>8; fBlu = fromPixels[j]&0xff; tRed = (toPixels[j]&0xff0000)>>16; tGre = (toPixels[j]&0xff00)>>8; tBlu = toPixels[j]&0xff; mRed = (int)(fRed + ((float)tRed-fRed)/(n-1)*(i-1)); mGre = (int)(fGre + ((float)tGre-fGre)/(n-1)*(i-1)); mBlu = (int)(fBlu + ((float)tBlu-fBlu)/(n-1)*(i-1)); tmpPixels[j] = mRed<<16|mGre<<8|mBlu; } } } }