//SAMA version=0.99; //Copyright (C) 2015 Maël Montévil and Tessie Paulose // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . print("***************************"); print("Starting SAMA images version "+version); //creates a directory if it does not exist yet function createdir(dir, suffix) { dirres=dir+suffix+"/"; if(!File.isDirectory(dirres)){ File.makeDirectory(dirres); } return dirres; } //function to bypass 3D suite weird renaming function measuresave(dir, name) { Ext.Manager3D_SaveResult("M",dir + name); File.rename(dir+"M_"+name , dir+name); return true; } //enhances the edges of structure in order for them not to depend much on the threshold function enhancedges(){ name=getTitle(); run("Duplicate...", "title=Duplicate duplicate range slices=1-"+nSlices); run("Variance 3D...", "x=2 y=2 z=2"); run("Gamma...", "value=0.50 stack"); maxx=0; minn=10000; for (j=1; j