Difference between revisions of "KymographBuilder : Yet Another Kymograph Fiji plugin"

(Scripting: Embed script directly, to avoid source code skew)
(Related links: Jenkins -> Travis)
Line 40: Line 40:
* [[Multi_Kymograph]] : The first kymograph bundled with Fiji, with support for multiple Line ROIs
* [[Multi_Kymograph]] : The first kymograph bundled with Fiji, with support for multiple Line ROIs
* Source code on GitHub : https://github.com/fiji/KymographBuilder
* Source code on GitHub : https://github.com/fiji/KymographBuilder
* Maven : http://maven.imagej.net/#nexus-search;quick~kymographbuilder
* Maven : https://maven.scijava.org/#nexus-search;quick~kymographbuilder
* Jenkins : http://jenkins.imagej.net/job/KymographBuilder/
* Travis CI : https://travis-ci.org/fiji/KymographBuilder
== Authors ==
== Authors ==

Latest revision as of 09:28, 9 July 2019

KymographBuilder (Fiji)
Author Hadrien Mary
Maintainer Hadrien Mary
Source on GitHub
Initial release 24/04/2016
Development status v1.2.2, stable


KymographBuilder is Yet Another Kymograph Fiji plugin.

Features are :

  • Build kymograph from a straight or segmented line (a polyline).
  • Build kymograph for images with multiple channels.
  • Take into account the width of the line using maximum projection along its thickness.
  • Built from scratch and use the ImageJ2 Ecosystem.
  • Fast and easy to use.

How to use :

  • Draw a line: it can be a polyline and you can also set the thickness that will be taken into account by the plugin.
  • Launch KymographBuilder : Plugins › Kymograph › KymographBuilder
  • You're done.
Kymograph Construction.png


You can script the plugin. Here is an example :


# @Context context
# @Dataset dataset
# @ImageJ ij
# @LogService log

# This script exemplifies how to instruct KymographBuilder to
# process all the line ROIs present in the ROI Manager. For more
# details see http://imagej.net/KymographBuilder
import ij.plugin.frame.RoiManager as RM
import sc.fiji.kymographBuilder.KymographFactory as KFactory

def validDataset(dataset):
    """Assess if dataset has suitable dimensions"""
    from net.imagej.axis import Axes
    z = dataset.dimension(dataset.dimensionIndex(Axes.Z))
    t = dataset.dimension(dataset.dimensionIndex(Axes.TIME))
    return z * t > 1

rm = RM.getInstance()
counter = 0
if validDataset(dataset) and rm and rm.getCount():
    for roi in rm.getRoisAsArray():
        if roi.isLine():
            kfactory = KFactory(context, dataset, roi)
            counter += 1
            title = "Kymograph" + str(counter).zfill(3) + "_" + roi.getName()
            ij.ui().show(title, kfactory.getKymograph())
    log.info("MultiKymographBuilder Finished. " + str(counter) + " ROIs processed")
    log.error("Either the ROI Manager is empty or " + dataset.getName() +" has invalid dimensions")

Related links


KymographBuilder has been created by Hadrien Mary.

This work started in 2016 at the Gary Brouhard laboratory (http://brouhardlab.mcgill.ca) at McGill University.