//　''Calculator_NPS1_Macro.txt''　Ver.1.01　
//　@Author; H.Kunitomo 	2010.08.18
//ROI設定した画像をFFT処理し，raw power spectrum(32bit)を取得．

run("Duplicate...", "title=[Original]");
run("Measure");
run("Polynomial Fit", "degree=2 degree=2");
imageCalculator("Subtract create 32-bit", "Original","Poly_Fit_2_2Original");
//run("Image Calculator...", "image1=Original operation=Subtract image2=Poly_Fit_2_2Original create 32-bit");
run("FFT Options...", "  raw");
run("FFT");
selectImage("Poly_Fit_2_2Original");  
run("Close");
selectImage("Result of Original");
run("Close");
selectImage("FFT of Result of Original");
run("Close");
selectImage("Original");
run("Close");

saveAs("Text Image","");


