Project

General

Profile

Files » Kymograph_Tool.txt

An ImageJ plugin tool that displays a kymogram - Volker Baecker, 09/20/2012 11:25 AM

 
/**
* Kymograph Tool
* Collaborators:
* Sara Salinas
*
* Display a kymogram of a time series stack for given selection (2D or 1D)
*
* (c) 2012, INSERM
* written by Volker Baecker at Montpellier RIO Imaging (www.mri.cnrs.fr)
*
*/

var Z_PROJECT = true;

macro "Kymograph Action Tool - C037T4d14k" {
setBatchMode(true);
title = getTitle();
hasSelection = false;
if (selectionType() != -1) hasSelection=true;
isHyperstack = Stack.isHyperstack;
if (isHyperstack) {
run("Reduce Dimensionality...", " frames keep");
if (hasSelection)
run("Restore Selection");
tmp = getTitle();
}
run("Reslice [/]...", "output=0.000 start=Top avoid");
slices = nSlices;
rename("kymogram of " + title);
if (isHyperstack) {
selectWindow(tmp);
close();
}
selectWindow("kymogram of " + title);
if (slices>1 && Z_PROJECT) {
run("Z Project...", "start=1 stop="+slices+" projection=[Max Intensity]");
selectWindow("kymogram of " + title);
close();
selectWindow("MAX_kymogram of " + title);
rename("kymogram of " + title);
}
setBatchMode("exit and display");
}
(2-2/4)