Skip to content, Skip to search


Clojure Scripting

451 bytes added, 08:47, 19 November 2008
added Dynamic ROI Profiler to the examples
* [;a=blob;f=plugins/Examples/random_noise_example.clj;hb=HEAD random_noise_example.clj]: illustrates how to declare a function inside a closure (for private access to, in this case, a unique instance of a random number generator), and then fill all pixels of a ByteProcessor image with a random byte value.
* [;a=blob;f=plugins/Examples/Command_Launchers/Command_Launcher_Clojure.clj;hb=HEAD Command_Launcher_Clojure.clj]: illustrates how to create a GUI with a KeyListener, so that the typed text changes color from red to black when it matches the name of an ImageJ command. This example is also under the [[Scripting comparisons]], along equivalent versions written in Java, [[Jython Scripting|Jython]], [[Javascript_Scripting|Javascript]] and [[JRuby_Scripting|JRuby]].
* [;a=blob;f=plugins/Analyze/Dynamic_ROI_Profiler.clj;hb=HEAD Dynamic ROI Profiler]: illustrates how to add a MouseMotionListener and a WindowListener to an ImageWindow of an open image. Reads out the ROI (Region Of Interest), and if it's a line, polyline or rectangle, plots the profile of pixel intensity along the line. As the mouse moves or edits the ROI on the image, the profile is updated.
Emailconfirmed, uploaders