// imageToObject 0.1 // This macro creates a digital 3D object from an image sequence // It asks for a directory path, then impots all images, converts them to 8-bit, substracts background, and runs the 3D viewer // To run the macro: open ImageJ, from the top menu Plugin, select Macros then Run… choose the file from your local disk. // For information on how to use imageJ, see // http://rsbweb.nih.gov/ij/ // Everardo Reyes Garcia, 2013. // http://ereyes.net dir = getDirectory("Choose image sequence"); list = getFileList(dir); print("directory contains " + list.length + " files"); run("Image Sequence...", dir); name = getTitle; print(name); run("8-bit"); run("Subtract Background...", "rolling=50 stack"); //setTool("hand"); run("3D Viewer"); call("ij3d.ImageJ3DViewer.add", name, "None", name, "0", "true", "true", "true", "2", "0");