Infobox Plugin | software = ImageJ | name = TrakEM2 | author = Albert Cardona | maintainer = Albert Cardona ([mailto: acardona@ini. phys.ethz.ch firstname.lastname@example.org]) | filename = TrakEM2_ .jar (Included in Fiji) | source = [http://repo.or.cz/w/trakem2.git trakem2 git repository] | released = May 2006 | latest version = 0.7m (4 December 2009) | status = active | category = [[:Category:Registration|Registration]], [[:Category:Segmentation|Segmentation]], [[:Category:Image annotation|Image annotation]], [[:Category:Plugins|Plugins]] | website = [http://www.ini.uzh.ch/~acardona/trakem2.html TrakEM2 news and documentation]}} TrakEM2 is an ImageJ plugin for morphological data mining, three-dimensional modeling and image stitching, registration, editing and annotation.
See [http://www.ini.uzh.ch/~acardona/snapshots.html TrakEM2 snapshots] for an overview.
== Features ==
* '''Segmentation:''' manually draw areas across stacks, and sketch structures with balls and pipes.
* '''Measurements:''' volumes, surfaces, lengths, and also measurements via ImageJ ROIs.
* '''Image Registration:''' register floating image tiles to each other using [[Feature_Extraction|SIFT]] and global optimization algorithms.
* [[TrakEM2 tutorials]] with video tutorials.
* Examples of [[TrakEM2 Scripting|scripting in TrakEM2]].
== Running fiji for heavy-duty, memory-intensive, high-performance TrakEM2 tasks ==
The following configuration has been tested in a machine with 8 CPU cores and 16 Gb of RAM, running Ubuntu 8.04 "Hardy", with a 1.6.0_16 or newer JVM:
fiji -Xms10g -Xmx10g -Xincgc -XX:MaxPermSize=256m -XX:PermSize=256m
-XX:NewRatio=5 -XX:CMSTriggerRatio=50 -XX:+UseCompressedOops --
* -XX:MaxPermSize=256m : set the heap size allocated to objects that don't need to be garbage often to 256 Mb. The default is only 32 Mb, which proves insufficient.
* -XX:PermSize=256m : preallocate the heap for the permanent objects directly to the desired maximum, 256 Mb, so it doesn't ever have to be resized.
* XX:NewRatio=5 : Set the ratio of ephemeral versus more long-lived objects to 5 (the default is 9 or more in 64-bit Sun JVMs).* XX:CMSTriggerRatio=50 : run the parallel garbage collector when the ratio of free versus non-free heap space is 50 % (the default is 92% in 64-bit JVM, which may incur in pauses and undesirable full sweeps).* XX:+UseCompressedOops : use 32-bit pointers when possible, in a 64-bit JVM. This can cut the memory footprint by half in many cases.
* The ending double hyphen "--" is to specify all of these are JVM arguments, not fiji/ImageJ arguments.
With the above settings, we have succesfully registered 33,000 image tiles corresponding to 459 serial sections, using the "Align multi-layer mosaic" TrakEM2 command.
== Examples ==
[[Image:Clahe-live-filter.jpg|thumb|left|232px|Effect of the [[Enhance Local Contrast (CLAHE)|CLAHE]] live filter in TrakEM2. Data with high dynamic range is displayed with perceptually boosted local contrast. [[Enhance Local Contrast (CLAHE)|CLAHE parameters]] are relative to display pixels and, therefore, will not result in an effective bandpass when zooming out largely on statically pre-processed images.]]
[[Image:Neuronal-arbors-1.png|thumb|left|232px|Neuronal arbors reconstructed with TrakEM2 using the [http://www.ini.uzh.ch/~acardona/trakem2_manual.html#trees treeline] segmentation type.]]
[[Image:TrakEM2_Display_segmentations.png|thumb|left|232px|Example TrakEM2 segmentations, including Ball, Pipe, Profile, AreaList and floating text labels.]]