Adaptive Feedback Microscopy ImageJ/FiJi utilities
Adaptive feedback microscopy are experiments where the microscopy software interacts with an image analysis software. The image is processed and depending on the results a different imaging protocol is started.
The Automated FCS plugin monitors a folder for new images generated by MyPiC and the LSM microscope. When a file matches a specified task in a pipeline the image is processed according to:
- Gaussian blur and threshold using a specified channel of the image
- Seeded watershed for objects that exceed a certain area size
- Pick objects of interest that are within an area size range and fluorescence intensity range
- If an object is found, send stage position(s) and/or FCS position(s) (computed with respect to the object of interest) to MyPiC
- Send to MyPiC which action to perform, e.g. update stage position for tracking or FCS measurements
Install FiJi to a directory where you have writing rights. Make sure that the binary options are set to black background
Process -> Binary -> Options -> Black background.
Without compiling the jar files
- Create a directory in the FiJi plugin directory e.g.
- Copy the jar files and the python file contained in the
distdirectory of this repository to the newly create directory
Compilation of the jar files
- Install maven
- Open a command line tool
- Change directory to
mvn packageto compile the package. If the compilation is successful the jar file is stored in a newly created
- Repeat point (3) in the directory
- Copy the jar files located in the respective
targetdirectories and the python file located in
dist\Automated_FCS_.pyto the FiJi plugins directory as explained before
- Get the commons-io java library (version >= 2.5, the plugin has been tested with common-io-2.5.jar) and copy the jar file to the FiJi plugins directory
Running the Automated FCS plugin
The user starts the plugin from
Plugins > EMBL > Automated Fcs.
The wiki contains the following sections:
- Directory to monitor and parameters GUI
- Image to analyze parameters
- Segmentation parameters
- FCS measurement points parameters
- Test and save settings commands
- Start monitoring commands
- Example workflow
|Main window||Parameter window|
- In the field Directory to monitor specify the directory where the data from MyPiC is stored
- Click on Parameters
- Parameter window
The user can specify up to three images that will be analyzed by the plugin (Job1-3). The images should match with MyPiC tasks in which processing is set to Online image Analysis. Commands and parameters are written in the WindowsRegistry
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\OnlineImageAnalysis\macro
for MyPiC to read.
Pipeline Name of MyPiC pipeline to analyze:
- None: Do not perform any analysis
Default: Analyze files containing string
*DE*from default pipeline
Trigger1: Analyze files containing name
*TR1*from Trigger1 pipeline
Trigger2: Analyze files containing name
*TR2*from Trigger2 pipeline
Task: This is the image number in the order of acquisition in the pipeline.
Command: Command passed to MyPiC upon successful segmentation. Written in the windows registry CodeMic.
- nothing: Do not perform any action
- focus: Useful for object based tracking in 3D. Compute center of mass of segmented binary object and pass coordinates to MyPiC (windows registry X, Y, Z). Microscopy positions are updated if MyPiC options TrackXY and/or TrackZ are on
- setFcsPos: Pass coordinates for FCS measurements to MyPiC (registry fcsX, fcsY, fcsZ). Number of points and positions are specified in FCS measurement points parameters. MyPiC starts FCS measurements at these positions if the next pipeline task is a FCS job
- setFcsPos;focus: Combination of 2 commands. MyPiC first performs FCS measurements and then updates the stage position according to the center of mass of the segmented object
- trigger1: MyPiC starts Trigger1 pipeline at XYZ of center of mass of segmented object(s). Several stage positions can be specified at once using Number of particles >
- trigger2: MyPiC starts Trigger2 pipeline at XYZ of center of mass of segmented object(s). Several stage positions can be specified at once using Number of particles >1
After segmentation objects that are within a certain area range and fluorescence intensity range are selected. From these objects the plugin picks one or more objects to be used for specifying imaging coordinates and FCS positions.
The plugin allows for object based tracking of a single cell using a nearest neighbor algorithm (Command: focus and Number of particles = 1). This can be used to perform long-term high resolution imaging of moving objects.
- Channel segmentation: Channel to use for object segmentation
- Seg. Method: Method to find threshold to separate foreground and background pixels. The name refers to the method as implemented in ImageJ
- filter radius (px) Radius in pixels of the Gaussian and median filters applied on the image before thresholding
- Exclude objects > (um2): Exclude objects above area-size in micrometer^2
- Exclude objects < (um2): Exclude objects below area-size in micrometer^2
- Watershed if > (um2): Perform a watershed operation on objects that exceed the area. This parameter is useful to separate objects that are in close proximity
- Exclude boundaries: If yes, objects touching the boundary are excluded
- Channels intensity filter1: Specify the channel number for which the fluorescence intensity must be in a certain range
- Min intensity filter 1: Minimal value of object mean fluorescence intensity of channel Channels intensity filter1
- Max intensity filter 1: Maximal value of object mean fluorescence intensity of channel Channels intensity filter1
- Channels intensity filter2: Additional channel to apply fluorescence intensity thresholds
- Number of particles: Maximally allow for this number of objects to be picked
Pick particle in
- center: Choose particles closest to the center of the image. When Number of particles = 1, this option allows for tracking an object in space
- random: Choose particles at random
Min and Max intensity The default values are for 8bit images. This needs to be increased for 12bit (maximum intensity 4093) or 16bit (maximum intensity 65536) images.
Note that FCS measurements are only performed by the microscope if the plugin sends the command setFcsPos or setFcsPos;focus to MyPiC. The points are placed with respect to the segmented primary object so that they are as distant as possible. The user can specify the distance from the boundary of the segmented primary object. FCS points can be placed only if a single object is chosen (Number of particle = 1). The rational is to associate a single image to FCS measurements corresponding to one cell/object.
- FCS pts. region 1 (inside): Number of FCS points in a region around the object of interest. The id of these points is nuc (nucleus)
- # oper. (erode < 0, dilate > 0): Number of pixels to erode or dilate depending on the sign. With negative values the FCS points are placed within the object of interest
- FCS pts. region 2 (outside): Number of FCS points in a region around the object of interest. The id of these points is cyt (cytoplasm)
- # oper. (erode < 0, dilate > 0): Number of pixels to erode or dilate depending on the sign. With positive values the FCS points are placed outside the object of interest
Update z-pos for FCS: If
YesFCS measurements are performed on a new Z position set from the center of mass of the segmented object of interest
- Run on file: Test the analysis pipeline on a user defined file. The program will prompt for a file.
- Load Para: Load parameters from a file named Automated_FCS.ini. Such a file is automatically generated after pressing Start in the main window.
- Save Para: Manually save parameters to a *.ini file.
- OK: Close window and return to main window.
Press Start to start the plugin and automatically process files created in the directory to monitor. Press RunOnDir to process a whole directory and test the segmentation pipeline.
When objects of interest are found, the segmentation results are saved to a jpg file. The output directoy is set in Analyze results saving.
If analyze only new files is clicked, only new generated files are processed. In case the user restarts MyPiC in the same folder, old files need to be deleted. If this option is not on, the plugin looks for changes in the files. In this situation it can occur that the plugin processes one file twice.
We show an example for an Automated FCS workflow that can be applied for a FCS-calibrated imaging pipeline or high-throughput FCS experiments.
The following parameters are used:
Cells express a fluorescent protein and their DNA has been stained with SiR-DNA. The workflow of MyPiC is as follows:
- Default pipeline:
- task 1: A XZ scan to find the reflection of the glass
- task 2: A low resolution imaging of the fluorescent protein (Channel 1) and DNA (Channel 2)
- Trigger 1:
- task 1: A XZ scan to find the reflection of the glass
- task 2: A high resolution imaging of the fluorescent protein (Channel 1) and DNA (Channel 3)
- task 3: FCS measurements
The Automated FCS plugin performs:
Job1: Cell detection using DNA channel. Cells expressing the fluorescent protein within a certain range are selected. The coordinates of cells fulfilling all criteria are passed to MyPiC to start the Trigger1 pipeline.
Job2: Cell detection using the DNA stain. Chooses the cell closest to the center in which fluorescent protein is expressed within a certain range. Determines the coordinates of the FCS measurements and passes their values to MyPiC. In task 3 of Trigger1 MyPiC will start FCS measurements at these positions.