usage:advanced_usage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
usage:advanced_usage [2020/06/24 18:51] – [Custom feature extraction] pseudomoanerusage:advanced_usage [2022/09/05 23:05] (current) pseudomoaner
Line 5: Line 5:
 ===== Non-standard workflows ===== ===== Non-standard workflows =====
  
-Although FAST contains all the essential tools for a complete image to track workflow, many users may find other tools that are able to perform portions of this workflow more effectively than FAST. For example, you may find a segmentation method that works better for your sample than that offered within the [[usage:segmentation|segmentation module]].+Although FAST contains all the essential tools for a complete image to track workflow, some users may wish to extend and adjust portions of this workflow. For example, you may find that different segmentation algorithm is more effective at analysing your data than FAST's inbuilt segmentation module, or that you need to extract a custom feature from your dataset for use during tracking. The modular design of FAST is intended to support these users.
  
-The modular design of FAST has been chosen to support these users.+Please note that the majority of these advanced features are only available if you are running the [[setup:installation#option_1installing_the_matlab-based_version|Matlab-based version]] of FAST. These tools generally require small tweaks to FAST's source code, which is only possible in the Matlab-based implementation.
  
 ==== Use of external segmentations ==== ==== Use of external segmentations ====
Line 47: Line 47:
 If using the stand-alone version of FAST, functions that can write .mat files from other languages (such as R's [[https://www.rdocumentation.org/packages/R.matlab/versions/3.6.2/topics/writeMat|writeMat]] function) should be used to perform this step. If using the stand-alone version of FAST, functions that can write .mat files from other languages (such as R's [[https://www.rdocumentation.org/packages/R.matlab/versions/3.6.2/topics/writeMat|writeMat]] function) should be used to perform this step.
  
-You will also need to provide FAST with the raw images from your dataset. This can be performed using FIJI in a similar way to the the segmentations, but each file ('Frame_0000.tif' etc.) should be save in a folder named 'Channel_N', where N indicates the index of the channel that image represents. For example, the 5th image of the 2nd channel in your dataset should be saved under 'root/Channel_2/Frame_004.tif'.+You will also need to provide FAST with the raw images from your dataset. This can be performed using FIJI in a similar way to the the segmentations, but each file ('Frame_0000.tif' etc.) should be saved in a folder named 'Channel_N', where N indicates the index of the channel that image represents. For example, the 5th image of the 2nd channel in your dataset should be saved under 'root/Channel_2/Frame_004.tif'.
  
 ==== Custom feature extraction ==== ==== Custom feature extraction ====
Line 53: Line 53:
 If there is a novel feature you wish to analyse but which is not natively provided by the [[usage:feature_extraction|feature extraction module]], it may be possible to add it to the feature extraction process by writing a new 'customFeats.m' function. This is a flexible piece of code that can be used for many purposes, and takes the following general form: If there is a novel feature you wish to analyse but which is not natively provided by the [[usage:feature_extraction|feature extraction module]], it may be possible to add it to the feature extraction process by writing a new 'customFeats.m' function. This is a flexible piece of code that can be used for many purposes, and takes the following general form:
  
-<code matlab>+<code matlab customFeatsTemplate.m>
 function feats = customFeats(inSeg,inChans,pxSize) function feats = customFeats(inSeg,inChans,pxSize)
 %CUSTOMFEATS can be customised to allow extraction of custom features from %CUSTOMFEATS can be customised to allow extraction of custom features from
Line 65: Line 65:
 %       Note: Input segmentation and channel images have been cut from the %       Note: Input segmentation and channel images have been cut from the
 %       original (full) images based on the bounding box of the %       original (full) images based on the bounding box of the
-%       segmentation. Absolute positions in the reference frame are +%       segmentation. Absolute positions in the reference frame 
-%       therefore not possible to extract using this script (although+%       therefore can't be extracted using this script (although
 %       relative positions can be). %       relative positions can be).
 %       -pxSize: Physical size of pixels in the image, in dataset specific %       -pxSize: Physical size of pixels in the image, in dataset specific
Line 73: Line 73:
 %   OUTPUTS: %   OUTPUTS:
 %       -feats: Vector of extracted feature values. If inSeg and inChans %       -feats: Vector of extracted feature values. If inSeg and inChans
-%       are empty, should return a vector of zeros of the same size - this+%       are empty, should return a vector of zeros of the same size as  
 +%       the output feature vector if these inputs were not empty - this
 %       is used to initialise storage in the feature extraction engine. %       is used to initialise storage in the feature extraction engine.
 % %
Line 107: Line 108:
 %       Note: Input segmentation and channel images have been cut from the %       Note: Input segmentation and channel images have been cut from the
 %       original (full) images based on the bounding box of the %       original (full) images based on the bounding box of the
-%       segmentation. Absolute positions in the reference frame are +%       segmentation. Absolute positions in the reference frame 
-%       therefore not possible to extract using this script (although+%       therefore can't be extracted using this script (although
 %       relative positions can be). %       relative positions can be).
 %       -pxSize: Physical size of pixels in the image, in dataset specific %       -pxSize: Physical size of pixels in the image, in dataset specific
Line 115: Line 116:
 %   OUTPUTS: %   OUTPUTS:
 %       -feats: Vector of extracted feature values. If inSeg and inChans %       -feats: Vector of extracted feature values. If inSeg and inChans
-%       are empty, should return a vector of zeros of the same size - this+%       are empty, should return a vector of zeros of the same size as  
 +%       the output feature vector if these inputs were not empty - this
 %       is used to initialise storage in the feature extraction engine. %       is used to initialise storage in the feature extraction engine.
 % %
Line 149: Line 151:
 </code> </code>
  
-By applying this to a mixture of //V. cholerae// and //P. aeruginosa// cells (separated into different populations based on fluorescence with the [[post:splitfluopopulationstracks.m|post-processing toolbox]]), the characteristic curvature of //Vibrio// cells compared to //Pseudomonas// cells can readily be observed:+By applying this to a mixture of //V. cholerae// and //P. aeruginosa// cells (separated into different populations based on fluorescence with the [[post:splitfluopopulationstracks.m|post-processing toolbox]]), the characteristic curvature of //Vibrio// cells compared to //Pseudomonas// cells can readily be quantified:
  
 {{ :usage:backbonecurves.png?nolink&400 |}} {{ :usage:backbonecurves.png?nolink&400 |}}
Line 200: Line 202:
 ==== Telling FAST about novel features ==== ==== Telling FAST about novel features ====
  
-Whether you add features through the customFeats.m script or create a new feature structure from scratch, FAST needs to be told some information about the properties of any features not included in its default setup. Please note that any changes that need to be made during this process will involve edits to parts of FAST's core code, and as such cannot be performed in the stand-alone version of FAST.+Whether you add features through the customFeats.m script or create a new feature structure from scratch, FAST needs to be told some information about the properties of any features not included in its default setup.
  
 === Informing the tracking module === === Informing the tracking module ===
Line 221: Line 223:
   * **Locations** defines the columns in **trackableData** that should be included as separate features. For example, each cell in **trackableData.Centroid** contains an Nx2 matrix of values, with the first column indicating the x-coordinate of the N objects and the second column the y-coordinate. As checking the **Position** box in the tracking module indicates that you wish to include both x and y coordinate data as features, **featureStruct.Centroid.Locations** is set as [1,2].   * **Locations** defines the columns in **trackableData** that should be included as separate features. For example, each cell in **trackableData.Centroid** contains an Nx2 matrix of values, with the first column indicating the x-coordinate of the N objects and the second column the y-coordinate. As checking the **Position** box in the tracking module indicates that you wish to include both x and y coordinate data as features, **featureStruct.Centroid.Locations** is set as [1,2].
   * **StatsType** defines if your feature is circular or linear.   * **StatsType** defines if your feature is circular or linear.
-  * **Range** only needs to be defined if **StatsType** is set as circular, and sets the 'seams' of the wrapped number line. For example, the object orientation **phi** transitions smoothly from -90^o to 90^o; **featureStruct.Orientation.Range** is therefore set as [-90 90].+  * **Range** only needs to be defined if **StatsType** is set as circular, and sets the 'seams' of the wrapped number line. For example, the object orientation **phi** transitions smoothly from -90° to 90°; **featureStruct.Orientation.Range** is therefore set as [-90 90].
  
 === Informing the division detection module === === Informing the division detection module ===
  • usage/advanced_usage.1593021075.txt.gz
  • Last modified: 2020/06/24 18:51
  • by pseudomoaner