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

(Related links: Jenkins -> Travis)
 
(6 intermediate revisions by 3 users not shown)
Line 18: Line 18:
 
Features are :
 
Features are :
  
* Build kymograph from single or multiple lines (a polyline).
+
* Build kymograph from a straight or segmented line (a polyline).
 
* Build kymograph for images with multiple channels.
 
* Build kymograph for images with multiple channels.
 
* Take into account the width of the line using maximum projection along its thickness.
 
* Take into account the width of the line using maximum projection along its thickness.
* Built from scratch and use the Imagej2 Ecosystem.
+
* Built from scratch and use the ImageJ2 Ecosystem.
 
* Fast and easy to use.
 
* Fast and easy to use.
  
 
How to use :
 
How to use :
* Draw a line : it can be a polyline and you can also set the thickness that will be take into account by the plugin.
+
* 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
+
* Launch KymographBuilder : {{bc|Plugins|Kymograph|KymographBuilder}}
 
* You're done.
 
* You're done.
  
 
[[File:Kymograph_Construction.png|center|thumb|600px|]]
 
[[File:Kymograph_Construction.png|center|thumb|600px|]]
 +
 +
== Scripting ==
 +
 +
You can script the plugin. Here is an example :
 +
 +
{{GitHubEmbed|org=fiji|repo=KymographBuilder|path=src/main/resources/script_templates/Examples/MultiKymographBuilder.py|label=MultiKymographBuilder.py}}
  
 
== Related links ==
 
== Related links ==
 
+
* [[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 ==
Line 41: Line 47:
 
KymographBuilder has been created by Hadrien Mary.
 
KymographBuilder has been created by Hadrien Mary.
  
This work started in 2016 at the Gary Brouhard laboratory (http://brouhardlab.mcgill.ca) at the University of McGill.
+
This work started in 2016 at the Gary Brouhard laboratory (http://brouhardlab.mcgill.ca) at McGill University.

Latest revision as of 10: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


Presentation

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

Scripting

You can script the plugin. Here is an example :

MultiKymographBuilder.py

# @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)
            kfactory.build()
            counter += 1
            title = "Kymograph" + str(counter).zfill(3) + "_" + roi.getName()
            ij.ui().show(title, kfactory.getKymograph())
    log.info("MultiKymographBuilder Finished. " + str(counter) + " ROIs processed")
else:
    log.error("Either the ROI Manager is empty or " + dataset.getName() +" has invalid dimensions")

Related links

Authors

KymographBuilder has been created by Hadrien Mary.

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