|
|
Adaptive Feedback Microscopy ImageJ/FiJi utilities
|
|
|
Adaptive Feedback Microscopy ImageJ/FiJi utilities
|
|
|
=========
|
|
|
Automated FCS
|
|
|
========
|
|
|
|
|
|
The repository [adaptive\_feedback\_mic\_fiji](https://git.embl.de/politi/adaptive_feedback_mic_fiji) contains ImageJ/FiJi tools to be used with the Zeiss VBA macro [MyPiC](https://git.embl.de/politi/mypic) to perform adaptive feedback microscopy experiments.
|
... | ... | @@ -7,7 +9,7 @@ The repository [adaptive\_feedback\_mic\_fiji](https://git.embl.de/politi/adapti |
|
|
|
|
|
> *Adaptive feedback microscopy* 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:
|
|
|
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:
|
|
|
|
|
|
1. Gaussian blur and threshold using a specified channel of the image
|
|
|
2. Seeded watershed for objects that exceed a certain area size
|
... | ... | @@ -28,8 +30,8 @@ Install [FiJi](http://fiji.sc/#download) to a directory where you have writing r |
|
|
1. Install [maven](https://maven.apache.org/index.html)
|
|
|
2. Open a command line tool.
|
|
|
3. Change directory to `automatedfcs` and type `mvn package` to compile the package. If the compilation is successful the jar file is stored in a newly created `automatedfcs\target` directory.
|
|
|
4. Repeat point 3. in the directory `segment_Particles` and `CommMicroscope`.
|
|
|
5. Copy the jar files and the python file located in the `dist` directory to the FiJi plugins directory as explained before.
|
|
|
4. Repeat point (3) in the directory `segment_Particles` and `CommMicroscope`.
|
|
|
5. Copy the jar files located in the respective `target` directories and the python file located in `dist\Automated_FCS_.py` to the FiJi plugins directory as explained before.
|
|
|
6. Get the [commons-io](https://commons.apache.org/proper/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
|
... | ... | @@ -45,6 +47,7 @@ The wiki contains following sections: |
|
|
* [**FCS measurement points parameters**](#fcspos)
|
|
|
* [**Test and save settings commands**](#save)
|
|
|
* [**Start monitoring commands**](#start)
|
|
|
* [**Example workflow**](#example)
|
|
|
|
|
|
## [<img src="./images/up.PNG">](#back) <a name="start"></a>Start the plugin
|
|
|
You can start the plugin from `Plugins > EMBL > Automated Fcs`.
|
... | ... | @@ -58,9 +61,9 @@ Main window | Parameter window| |
|
|
<img src = './images/AutomatedFCS_GUI_Artboard1.png' width = "400px" > | <img src = './images/AutomatedFCS_GUI_Artboard2.png' width = "400px" >
|
|
|
|
|
|
|
|
|
1. In the field `Directory to monitor` specify the directory where the data from MyPiC is stored
|
|
|
2. Click on `Parameters`
|
|
|
3. This will open a window where the user can enter the specifications for the image analysis
|
|
|
1. In the field **Directory to monitor** specify the directory where the data from MyPiC is stored.
|
|
|
2. Click on **Parameters**.
|
|
|
3. Paramter window.
|
|
|
|
|
|
## [<img src="./images/up.PNG">](#back) <a name = "image"></a>Image to analyze parameters
|
|
|
|
... | ... | @@ -68,7 +71,7 @@ Main window | Parameter window| |
|
|
<div align = "center" > <img src = './images/AutomatedFCS_GUI_Artboard3.png' width = "400px" > </div>
|
|
|
|
|
|
|
|
|
The user can specify up to 3 images that will be analyzed by the plugin (Job1-3). The images should match to MyPiC task where processing is set to `Online image Analysis`. Commands and parameters are written in the WindowsRegistry
|
|
|
The user can specify up to 3 images that will be analyzed by the plugin (Job1-3). The images should match to MyPiC task where 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
|
... | ... | @@ -76,69 +79,69 @@ HKEY_CURRENT_USER\Software\VB and VBA Program Settings\OnlineImageAnalysis\macro |
|
|
|
|
|
for MyPiC to read.
|
|
|
|
|
|
1. **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
|
|
|
1. **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.
|
|
|
|
|
|
2. **Task**: This is the image number in the order of acquisition of the pipeline
|
|
|
2. **Task**: This is the image number in the order of acquisition of the pipeline.
|
|
|
3. **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 position 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](#fcspos). MyPiC starts FCS measurements at these positions if the next 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 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** >1
|
|
|
* `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
|
|
|
* **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 position 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](#fcspos). 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 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** >1.
|
|
|
* **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.
|
|
|
|
|
|
## [<img src="./images/up.PNG">](#back) <a name="segmentation"></a> Segmentation parameters
|
|
|
|
|
|
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.
|
|
|
|
|
|
In object detection allows for object based tracking of a single cell using a nearest neighbor algorithm (Command: **focus**). This can be used to perform long term high-resolution imaging of objects that are moving in space using a small field of view.
|
|
|
In 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.
|
|
|
|
|
|
<div align = "center" > <img src = './images/AutomatedFCS_GUI_Artboard4.png' width = "400px" > </div>
|
|
|
|
|
|
|
|
|
|
|
|
1. **Channel segmentation**: Channel to use for object segmentation
|
|
|
2. **Seg. Method**: Method to find threshold to separate foreground and background pixels. The name refers to the method as implemented in ImageJ
|
|
|
3. **filter radius (px)** Radius in pixels of the Gaussian and median filters applied on the image before thresholding
|
|
|
4. **Exclude objects > (um2)**: Exclude objects above area-size in micrometer^2
|
|
|
5. **Exclude objects < (um2)**: Exclude objects below area-size in micrometer^2
|
|
|
6. **Watershed if > (um2)**: Perform a watershed operation on objects that exceed area. This parameter is useful to separate objects that are in close proximity
|
|
|
7. **Exclude boundaries**: If yes objects touching the boundary are excluded
|
|
|
8. **Channels intensity filter1**: Specify channel number for which the fluorescence intensity must be in a certain range
|
|
|
9. **Min intensity** filter 1: Minimal value for mean fluorescence intensity in segmented object of channel (**Channels intensity filter1**)
|
|
|
10. **Max intensity** filter 1: Maximal value for mean fluorescence intensity in segmented object of channel (**Channels intensity filter1**)
|
|
|
11. **Channels intensity filter2**: Additional channel to apply fluorescence intensity thresholds
|
|
|
12. **Number of particles** Maximally allow for this number of objects to be picked
|
|
|
1. **Channel segmentation**: Channel to use for object segmentation.
|
|
|
2. **Seg. Method**: Method to find threshold to separate foreground and background pixels. The name refers to the method as implemented in ImageJ.
|
|
|
3. **filter radius (px)** Radius in pixels of the Gaussian and median filters applied on the image before thresholding.
|
|
|
4. **Exclude objects > (um2)**: Exclude objects above area-size in micrometer^2.
|
|
|
5. **Exclude objects < (um2)**: Exclude objects below area-size in micrometer^2.
|
|
|
6. **Watershed if > (um2)**: Perform a watershed operation on objects that exceed area. This parameter is useful to separate objects that are in close proximity.
|
|
|
7. **Exclude boundaries**: If yes objects touching the boundary are excluded.
|
|
|
8. **Channels intensity filter1**: Specify channel number for which the fluorescence intensity must be in a certain range.
|
|
|
9. **Min intensity** filter 1: Minimal value of object mean fluorescence intensity of channel **Channels intensity filter1**.
|
|
|
10. **Max intensity** filter 1: Maximal value of object mean fluorescence intensity of channel **Channels intensity filter1**.
|
|
|
11. **Channels intensity filter2**: Additional channel to apply fluorescence intensity thresholds.
|
|
|
12. **Number of particles**: Maximally allow for this number of objects to be picked.
|
|
|
12. <a name=pickpoints></a>**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 one particle at random.
|
|
|
* **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
|
|
|
>
|
|
|
|
|
|
## [<img src="./images/up.PNG">](#back) <a name=fcspos></a> FCS measurement points parameters
|
|
|
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. For example for 4 points the FCS points are located on 2 orthogonal lines. 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 each FCS measurement corresponding to one cell/object.
|
|
|
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.
|
|
|
|
|
|
<div align = "center" > <img src = './images/AutomatedFCS_GUI_Artboard5.png' width = "400px" > </div>
|
|
|
|
|
|
1. **FCS pts. region 1 (inside)**: Number of FCS in a region around the object of interest. The id of these points is *nuc* (nucleus)
|
|
|
2. **# oper. (erode < 0, dilate > 0)**: Number of pixels to erode or dilate depending on the sign. With negative values the FCS points are placed withing the object of interest
|
|
|
3. **FCS pts. region 2 (outside)**: umber of FCS in a region around the object of interest. The id of these points is *cyt* (cytoplasm)
|
|
|
4. **# 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
|
|
|
5. **Update z-pos for FCS**: If *Yes* FCS measurements are performed on a new Z-position set from the center of mass of the segmented object of interest
|
|
|
1. **FCS pts. region 1 (inside)**: Number of FCS in a region around the object of interest. The id of these points is *nuc* (nucleus).
|
|
|
2. **# oper. (erode < 0, dilate > 0)**: Number of pixels to erode or dilate depending on the sign. With negative values the FCS points are placed withing the object of interest.
|
|
|
3. **FCS pts. region 2 (outside)**: Number of FCS in a region around the object of interest. The id of these points is *cyt* (cytoplasm).
|
|
|
4. **# 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.
|
|
|
5. **Update z-pos for FCS**: If Yes FCS measurements are performed on a new Z-position set from the center of mass of the segmented object of interest.
|
|
|
|
|
|
## [<img src="./images/up.PNG">](#back) <a name=save></a> Test and save settings commands
|
|
|
|
|
|
<div align = "center" > <img src = './images/AutomatedFCS_GUI_Artboard6.png' width = "400px" > </div>
|
|
|
|
|
|
1. **Run on file**: Test the analysis pipeline on a user defined file. The program will prompt for a file
|
|
|
2. **Load Para**: Load parameters from a file named *Automated_FCS.ini*. Such a file is automatically generated after pressing [**Start**](#start).
|
|
|
3. **Save Para**: Manually save parameters to a **.ini* file
|
|
|
4. **OK**: Close window and return to main window
|
|
|
1. **Run on file**: Test the analysis pipeline on a user defined file. The program will prompt for a file.
|
|
|
2. **Load Para**: Load parameters from a file named *Automated_FCS.ini*. Such a file is automatically generated after pressing [**Start**](#start) in the main window.
|
|
|
3. **Save Para**: Manually save parameters to a **.ini* file.
|
|
|
4. **OK**: Close window and return to main window.
|
|
|
|
|
|
## [<img src="./images/up.PNG">](#back) <a name=start></a>Start monitoring commands
|
|
|
<div align = "center" > <img src = './images/AutomatedFCS_GUI_Artboard7.png' width = "400px" > </div>
|
... | ... | @@ -147,16 +150,18 @@ To start the plugin and automatically process files created in the directory to |
|
|
|
|
|
To process a whole directory and test the segmentation pipeline press **RunOnDir**.
|
|
|
|
|
|
When an objects of interest are found segmentation results jpg files are saved in the directories specified in **Analyze results saving**
|
|
|
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 you restart 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.
|
|
|
|
|
|
|
|
|
## [<img src="./images/up.PNG">](#back) <a name=start></a>Example output for FCS-calibrated imaging
|
|
|
We show an example for Automated FCS using these parameters
|
|
|
## [<img src="./images/up.PNG">](#back) <a name=start></a>Example workflow
|
|
|
We show an example for **Automated FCS** workflow that can be applied for a FCS-Calibrated pipeline or a high-throughput FCS experiments.
|
|
|
|
|
|
<img src = './images/AutomatedFCS_GUI_Artboard2.png' width = "400px" >
|
|
|
Following parameters are used
|
|
|
|
|
|
<div align = "center" > <img src = './images/AutomatedFCS_GUI_Artboard2.png' width = "400px" ></div>
|
|
|
|
|
|
Cells express a fluorescent protein and their DNA has been stained with SiR-DNA. The workflow of MyPiC is as following
|
|
|
|
... | ... | @@ -168,18 +173,17 @@ Cells express a fluorescent protein and their DNA has been stained with SiR-DNA. |
|
|
* task2: A high resolution imaging of the fluorescent protein (Channel 1) and DNA (Channel 3)
|
|
|
* task3: FCS measurements
|
|
|
|
|
|
The *Automated FCS* plugins performs:
|
|
|
* Job1: Cell detection using DNA channel. Cells where the fluorescent protein is within a certain range are selected. The coordinates of cells that fulfill all criteria are passed to MyPiC to start the Trigger1 pipeline.
|
|
|
The **Automated FCS** plugins performs:
|
|
|
|
|
|
Output generated for every processed image | Output generated when objects of interest are found
|
|
|
:--- | :---
|
|
|
<img src = './images/example_output.png' width = "400px" > | <img src = './images/example_output2.png' width = "400px" >
|
|
|
Segmentation of the DNA channel (red) returned 16 ROIs. <br/>Only for ROI 10 and 13 is the intensity of the fluorescent protein (green) within the specified range. | The ROI for the two cells picked are shown in green. <br/> The coordinates are passed to MyPiC to execute the Trigge1 pipeline for each position
|
|
|
* Job1: Cell detection using DNA channel. Cells where the fluorescent protein is within a certain range are selected. The coordinates of cells that fulfill all criteria are passed to MyPiC to start the Trigger1 pipeline.
|
|
|
|
|
|
* Job2: detects cells using the DNA stain. Chooses the cell closest to the center where the fluorescent protein is within a certain range. Determines the coordinates of the FCS measurements and pass their values to MyPiC. In task 3 of Trigger1 MyPiC will start FCS measurements at these positions.
|
|
|
|
|
|
Output generated for every processed image | Output generated when objects of interest are found
|
|
|
**JOB1: Output generated for every processed image** | **JOB1: Output generated when objects of interest are found**
|
|
|
:--- | :---
|
|
|
<img src = './images/example_output.png' width = "400px" > | <img src = './images/example_output2.png' width = "400px" >
|
|
|
Segmentation of the DNA channel (red) returned 17 ROIs. <br/>Only for ROI 10 and 13 is the intensity of the fluorescent protein (green) within the specified range. | Outlines for the two cells picked are shown in green.<br/> The coordinates are passed to MyPiC to execute the Trigger1 pipeline for each position.
|
|
|
**JOB2: Output generated for every processed image**| **JOB2: Output generated when objects of interest are found**
|
|
|
<img src = './images/example_output3.png' width = "400px" > | <img src = './images/example_output4.png' width = "400px" >
|
|
|
Segmenation of the DNA channel (red) returned 2 ROIs. <br/> For both ROI 1 and 2 is the intensity of the fluorescent protein (green) within the specified range. | In green is picked This is the cell closest to the center. <br/> In red is shown the cells that has not been picked <br/> The coordinates for the two FCS points are passed to MyPiC
|
|
|
Segmenation of the DNA channel (red) returned 2 ROIs. <br/> For ROI 1 and 2 the intensity of the fluorescent protein (green) is within the specified range. | Cell closest to center of image is picked (green outline). <br/>The red outline shows a cell that has not been picked because too far from the center of the image. <br/> Coordinates for the two FCS points are passed to MyPiC.
|
|
|
|