//run("T1 Head (2.4M, 16-bits)"); //Stack.setUnits("xunit", "yunit", "zunit", "secs", "density"); if (Stack.getOrthoViewsID == 0) exit("No stack OrthoView is open"); selectImage(Stack.getOrthoViewsID); path = getDirectory("image"); if (path != "") { path = replace(path,"\\","/"); call("ij.io.OpenDialog.setDefaultDirectory", path); } image = getImageID(); title = getTitle(); title = replace(title, "\\.\\w+$", ""); path = getDirectory("image"); sliceNumber = getSliceNumber(); Stack.getOrthoViews(OrthoPosX, OrthoPosY, OrthoPosZ); Stack.getOrthoViewsIDs(OrthoViewXY, OrthoViewYZ, OrthoViewXZ); print("OrthoPos X: " + OrthoPosX); print("OrthoPos Y: " + OrthoPosY); print("OrthoPos Z: " + OrthoPosZ); OrthoTitleXY = title+" XY("+OrthoPosZ+")"; OrthoTitleXZ = title+" XZ("+OrthoPosY+")"; OrthoTitleYZ = title+" YZ("+OrthoPosX+")"; selectImage(OrthoViewXY); run("Duplicate...", "title=["+OrthoTitleXY+"]"); setOption("Changes", true); selectImage(OrthoViewXZ); run("Duplicate...", "title=["+OrthoTitleXZ+"]"); setOption("Changes", true); selectImage(OrthoViewYZ); run("Duplicate...", "title=["+OrthoTitleYZ+"]"); setOption("Changes", true); Stack.stopOrthoViews; run("Tile");