// Parameters that can be adjusted by user to fit to their processing pipeline.
substringIdentifyingImageGroup = ""; // Should a group of images be pre-selected? If yes, specify a substring that is contained in each of their names.
substringsIdentifyingFirstImage = newArray("t0", "start"); // If an image whose name contains one of these substrings is found, it will be suggested as the starting one.
timeSpecificationPrefix = "t"; // The prefix after which one or more digits specify the time point at which the image was taken. For example, if timeSpecificationPrefix == "time", then "time48h" would be a validtime specification with the value of "48".
substringsIdentifyingFirstImage = newArray("start"); // If an image whose name contains one of these substrings is found, it will be suggested as the starting one.
//substringsIdentifyingFirstImage = newArray(timeSpecificationPrefix + "0", "start"); // If an image whose name contains one of these substrings is found, it will be suggested as the starting one.
// Thresholding method to apply to the gradient image to identify the empty areas. So far, "Minimum" seems to work best.
limitEmptyROIByExactEmptyRegionsFromFirstImage = !true; // False if some movement or growth of the gap is allowed (use "Rectangle Between Fiducials From First Image" for limiting the ROI). True if the gap can never move or grow (use "Empty Regions Between Fiducials From First Image").
alwaysCloseOlderIntermediateImagesOnStart = true;
defaultCloseIntermediateImages = true;
@@ -119,6 +129,28 @@ function selectIfExists(title) {
}
function createCopyOfImageListWithPaddedTimes(list) {
listWithPaddedTimes = Array.copy(list);
// Find how many digits there are in the longest time specification.
maxDigits = 0;
for (i = 0; i < listWithPaddedTimes.length; i++) {
Dialog.addMessage("You will know the process is done when \"All computations done.\"\nmessage appears in the Log window, and an audio tone plays.");
@@ -143,7 +178,7 @@ function createSetupDialog() {
// Add a list for the selection of the first image. Pre-select the first image whose title contains any of the substrings listed in substringsIdentifyingFirstImage.
candidateFirstImageTitle = "";
for (i = 0; i < imageList.length; i++) {
for (i = 0; (i < imageList.length) && (candidateFirstImageTitle == ""); i++) {
lowerCaseImageName = toLowerCase(imageList[i]);
for (j = 0; j < substringsIdentifyingFirstImage.length; j++) {
if (lowerCaseImageName.indexOf(substringsIdentifyingFirstImage[j]) >= 0) {
@@ -154,7 +189,7 @@ function createSetupDialog() {
print("These images were selected for analysis:" );
for (i = 0; i < imagesToAnalyze.length; i++) {
@@ -328,15 +366,6 @@ function finalize() {
function processImages(imagesToAnalyze) {
// Make sure the starting image is the first element of imagesToAnalyze.
for (i = 1; i < imagesToAnalyze.length; i++) {
if (imagesToAnalyze[i] == firstImageTitle) {
temp = imagesToAnalyze[0];
imagesToAnalyze[0] = imagesToAnalyze[i];
imagesToAnalyze[i] = temp;
}
}
//setBatchMode("hide"); // TODO: Batch mode can be enabled if no intermediate images should be shown. (However, this might hide the causes of some errors from the user.)
selectIfExists("Log");
@@ -728,7 +757,7 @@ function processImage(imageIndex, imageToAnalyzeTitle) {