=========== Image input =========== Once you have started :program:`BacStalk` the :guilabel:`Image input`-tab is displayed. BacStalk can handle either individual non-related files or an explicit file series (jpeg or tif files). The individual filenames are parsed to assign metadata (Time, Position, ...) and channel information to each image in BacStalk. .. container:: note Stalk-detection works best on phase contrast images. The typical workflow involes: - Add images files to BacStalk - Assign channel information - Assign metadata - Enter pixel spacing - Select type of cells 1. **Add files**: To start, press :guilabel:`Add files` to select all files associated with an experiment. Hold :kbd:`Ctr` to select multiple files. The selected files appear in the listbox on the left. 2. **Channels**: BacStalk assigns microscope channel information to the added files by searching their filenames for key words. - Add as many channels as present in your data by clicking :guilabel:`Add channel`. - Name the channels according to your needs. - For :guilabel:`Filename contains` enter an unique identifier for the corresponding channel. - Click :guilabel:`Update` to update your file list below. 3. **Metadata**: Assign information ( :guilabel:`Time`, :guilabel:`Position`, or :guilabel:`Custom` ). - Add as many metadata labels as present in your filenames by clicking :guilabel:`Add metadata`. - Select the metadata type. - :guilabel:`Start with`: Enter unique character(s) before the the metadata string. - :guilabel:`Capture until`: Enter the character(s) which are terminating your metadata field. - Whenever your metadata is numeric, check :guilabel:`Numeric data`. - Click :guilabel:`Update` to update your file list below. .. container:: note Once the metadata field :guilabel:`Time` is used and :guilabel:`Numeric data` is enabled, BacStalk will treat the image input as *time series*. :guilabel:`Drift correction` can be enabled to remove a global lateral drift of the image information. In addition a *time series* is required for cell tracking. 4. Enter the image pixel size at :guilabel:`Scaling` (microns/pixel). 5. If your cells grow stalks, check My cells... :guilabel:`... have stalks`. If they devide via stalked budding, check My cells... :guilabel:`... form buds`. . Example ------- 1. Consider the following timeseries with two positions and two channels (Phase contrast + YFP) .. list-table:: :widths: 100 :header-rows: 1 * - Files * - 20171117_OL3_try1_1_w1Ph3_s1_t1.tif * - 20171117_OL3_try1_1_w1Ph3_s1_t2.tif * - 20171117_OL3_try1_1_w1Ph3_s1_t3.tif * - 20171117_OL3_try1_1_w1Ph3_s1_t4.tif * - 20171117_OL3_try1_1_w2YFP_s1_t1.tif * - 20171117_OL3_try1_1_w2YFP_s1_t2.tif * - 20171117_OL3_try1_1_w2YFP_s1_t3.tif * - 20171117_OL3_try1_1_w2YFP_s1_t4.tif * - 20171117_OL3_try2_1_w1Ph3_s1_t1.tif * - 20171117_OL3_try2_1_w1Ph3_s1_t2.tif * - 20171117_OL3_try2_1_w1Ph3_s1_t3.tif * - 20171117_OL3_try2_1_w1Ph3_s1_t4.tif * - 20171117_OL3_try2_1_w2YFP_s1_t1.tif * - 20171117_OL3_try2_1_w2YFP_s1_t2.tif * - 20171117_OL3_try2_1_w2YFP_s1_t3.tif * - 20171117_OL3_try2_1_w2YFP_s1_t4.tif 2. Enter the following channels/metadata information: .. image:: ../images/channels_metadata.png :alt: Example image :width: 100 % :align: center 3. After clicking any :guilabel:`Update`-Button, the file list should look like this: .. image:: ../images/filelist.png :alt: Example image :width: 100 % :align: center .. container:: caution BacStalk expects monochromatic (grayscale) images. If RGB images are provided, they are displayed in colors inside BacStalk but are converted to grayscale images during processing! Additional parameters --------------------- - :guilabel:`Drift correction`: Enable image drift correction by image registration (requires a time series). See: [1]_ - :guilabel:`Scaling`: Pixel size in micrometers. Required to calculate cell sizes in micrometers. My cells... - :guilabel:`...have stalks`: Enable/disable stalk detection. Stalk detection parameters at the cell/stalk detection panel (see :ref:`Data analysis`) are only available if stalk detection is enabled. - :guilabel:`...form buds`: Enable/disable bud assignment. Working with pre-segmented data from other software tools --------------------------------------------------------- If you prefer/need to use a segmentation algorithm that differs from BacStalk's segmentation, you can import a custom segmentation from another software tool (e.g. MicrobeJ, Oufti) into BacStalk, and then proceed with the BacStalk analysis based on your custom segmentation input. Generally, if you want to use BacStalk's analysis and visualization capabilities with custom pre-segmented data the following workflow can be used. 1. In the software tool that you want to use for segmentation (e.g. Oufti, MicrobeJ), export the segmented data as binary image masks (with separate images for cells and stalks). 2. Treat the binary masks as regular input images inside BacStalk and check :guilabel:`Use binary masks` in the :guilabel:`Advanced` options tab. Then perform the BacStalk segmentation again on these binary masks. Now BacStalk will recognize these masks. **References:** .. [1] Manuel Guizar-Sicairos, Samuel T. Thurman, and James R. Fienup, "Efficient subpixel image registration algorithms," Opt. Lett. 33, 156-158 (2008)