/*
*******************************************
* *
* LLSM Edge Clipping *
* made by Nicholas Condon (c) *
* contact n.condon@uq.edu.au *
* *
*******************************************
AboutME:
This ImageJ script was made by Nicholas Condon
ACRF:Cancer Biology Imaging Facility,
The Institute for Molecular Biosciences,
University of Queensland, Australia.
This script is written in the ImageJ Macro Language.
Input images should be deskewed LLSM files (multi-dimensional is fine).
Optional pop-up for also saving Z-Projections with Max- Min- & Average selectable.
Optional Check box for running the 'To Imaris' Imaris plugin if you have the XT package and FIJI linked.
*/
//IMB Macro Splash screen (Do not remove this acknowledgement)
showMessage("Institue for Molecular Biosciences ImageJ Script", ""
+"
ACRF: Cancer Biology Imaging Facility
+"The University of Queensland
+"ImageJ Script Macro: LLSM Edge Clipping
"
+"Created by Nicholas Condon 2018
"
+"This script takes deskewed LLSM stacks and removes saturated pixels at the edge of each slice. Currently supports multi-channel & frame datasets. "
+"Files to be processed should be in their own directory, processed images will be placed into a subdirectory called Results.
"
+""
+""
+" contact n.condon@uq.edu.au"
+"
"
+" "
+"");
//Directory Warning panel
title = "Select Directory location";
msg = "Use the next window to navigate to your directory of images. (Note a sub-directory called Results will be made within this fodler.)";
waitForUser(title, msg);
//Setting up directory locations etc
start = getTime();
run("Clear Results");
path = getDirectory("Choose Source Directory ");
list = getFileList(path);
resultsDir = path+"Results/";
File.makeDirectory(resultsDir);
setBatchMode(true);
//Box for choosing post processing stuff.
Dialog.create("Post Processing Steps");
Dialog.addMessage(" ")
Dialog.addChoice("Run Z-Projection", newArray("No Projection", "Max Intensity", "Average Intensity", "Sum Slices"));
Dialog.addCheckbox("Push to Imaris upon completion", false);
Dialog.show();
projectiontype = Dialog.getChoice();
Imaris = Dialog.getCheckbox();
//warning for having Imaris running if option is selected.
if (Imaris==1) {
Dialog.create("WARNING");
Dialog.addMessage("Imaris must be running. If not start it now before continuing.")
Dialog.show();
}
//File loop for multiple images in a folder
for (z=0; z