FARSIGHT Tutorials/5-Label
Contents |
Details
- Goal: This tutorial is intended to show you how to use the specialized FARSIGHT segmentation modules to process a 4-dimensional (5-Label) image from start to finish.
- Duration: 1 hour
- Requisites: Basic familiarity with Python commands
- Materials: FARSIGHT Installed, example images downloaded
Basics Concepts
Farsight uses the "divide and conquer" approach. Each of the channels (labels) in the images is processed individually and the results combined at the end to create a complete solution. Each "module" in farsight is a stand-alone application that can be executed from within python. Python is used to allow for easy parameter adjustment and pipelining of segmentation modules. Most modules require two inputs - 1. Parameter File (XML), 2. Image File.
Starting the Interpreter
The first thing you need to do is to start your Python interpreter
- From the Farsight GUI select View > Open Python Window to start the python interpreter.
Reading an image from a file and Showing it
Getting example image
The example image is available at: link not available
This image was acquired using the spectral fingerprinting software available on the Zeiss META system, 32-point spectral fingerprints were captured for each fluorophore, and the built-in linear unmixing software was used to isolate the signals into a set of five individual channels labeling: (i) cell nuclei (CyQuant); (ii) astrocytes (GFAP); (iii) neurons (Nissl); (iv) blood vessels (EBA); and (v) microglia (Iba1). The original 5-Label Image has the Ziess .LSM extension. For the purposes of this tutorial we have split the image into its 5 channels and cropped a small region from each.
Showing an image
The sample image can be viewed from the Farsight GUI using the File|Load Image command.
Part II: Processing the image
Nuclear Segmentation
The first step in nuclear segmentation is creating the parameter file. The details of how to choose these parameters can be found on the Nuclear Segmentation page. Below we provide default parameters that will work well for the sample image provided.
high_sensitivity : 1 LoG_size : 30 min_scale : 2 max_scale : 7 xy_clustering_res : 2 z_clustering_res : 1 finalize_segmentation : 0 sampling_ratio_XY_to_Z : 5 Use_Distance_Map : 1 refinement_range : 3
Save this file as NucParams.ini
Make sure that your current Python working directory is set to the location of the input file using this command:
import os os.getcwd()
You can change the working directory with this command:
os.chdir(dirname)
Now you are ready to trigger the segmentation module:
import subprocess subprocess.call(['segment_nuclei.exe', 'NM_crop1_Nuc.pic', 'NM_crop1_Nuc_label.pic', 'NucParams.ini'])
The command should execute the nuclear segmentation on the image named NM_crop1_Nuc.pic using the parameters in NucParams.ini and save the output as NM_crop1_Nuc_label.pic.