Running the scripts requires ImageJ version 1.46 or later and TransformJ plugin (http://www.imagescience.org/meijering/software/transformj/)

This guideline provides instruction to use the scripts in the /imagej_scripts folder to orient the scans of 48 and 72 hpf larvae of Platynereis dumerilii. Each scan should contain DAPI, acetylated tubulin and gene expression signals. Each of the signals should be recorded as individual channel and stored in TIFF file ending with _dapi.tif (DAPI cahnnel), _green.tif (tubulin channel), _red.tif (gene expression). 

Macro_orient48 and Macro_orient72 scripts orient images of 48 and 72 hpf Platynereis larvae correspondently. It is necessary to specify the names of input (dir) folder (with TIFF files) and output (outdir) folder. For proper orientation, larvae should be scanned so that intensity of the ciliary band is saturated whereas nerve cord intensity is not. 

We also provide the script for manual orientation if the automatic orientation failed for some reason or an organism under study is other than Platynereis.
1. Define affine transform and store it in the *.mat file (You might use ImageJ 3DViewer. In this case you should remove first comment lines from the transform file). You can see an example of the transform file in the example_transform_file.txt file provided with the scripts.
2. Specify input parameters for the script Macro_applyTransform and run it. The script applies the specified transform to the images stored in TIFF file ending with _dapi.tif (DAPI channel), <fname>_green.tif (tubulin channel), <fname>_red.tif (gene expression).
3. Note that *.mat file should have the same name as the original file. For example, if you have image channels stored as image_dapi.tif, image_green.tif and image_red.tif then matrix file should be named as image.mat  
