It is possible ro call Fji and TfóunderSTORm via Matlab, import image stack, run the analysis and pass the created localization dataset and use the rainSTORM's algorithms for further processing (drift correction, super-resolved image visualization, histogram creation, filtering, concatenation, clusterization...).

# ThunderSTORM install

There are helper function to run ThunderSTORM through MIJ (although has not been tested for a while, so might need a few adjustments)

# Packages

These components has to installed manually:

Copy [`mij.jar`](https://www.mathworks.com/matlabcentral/fileexchange/47545-mij-running-imagej-and-fiji-within-matlab) in the softwares/ThunderSTORM folder

Copy the `ImageJ` package into the following folder:

	softwares/ThunderSTORM/

Copy the `ThunderSTORM` package into the `ImageJ`'s "plugin" folder:

	softwares/ThunderSTORM/ImageJ/plugin/

The `bioformats` package is not required for "normal" usage but can be useful for testing (manually opening image stack with the installed `ImageJ`). Copy it into the `ImageJ`'s "plugin" folder:

	softwares/ThunderSTORM/ImageJ/plugin/

	
# Adjustments
	
The Matlab's "Java Heap Memory" needs to be increased. According to the command line output prints, at least 223 MB is needed:

	Settings -> General -> Java Heap Memory

# Usage

Change the working directory to the main folder.
Run to "ThunderSTORM_initialize.m" to add MIJ, Fiji and ThunderSTORM to the java path.
Generate settings for ThunderSTORM
Use these settings in the bach processing script or in the example script. Or run separately the "TunderSTORM_imageStackReading.m" and "ThunderSTORM_localization.m".

NOTE: ThunderSTORM has not been tested for the rainSTORM 4.0 beta, some things might be broken!!!!



