Macro_Select_ROI_for_Segmentation - stoeter/Fiji-Tools-for-HCS GitHub Wiki

Table of Contents

Macro Select ROI for Segmentation

  • This macro is part of the "Fish_Embryo_Screen" macro set.
  • This macro loads tiled Opera images (.tif, generated from Macro Opera Stack Montage for Fish) and enables the user to draw a ROI which is saved for further prosessing.
  • Optionally objects can be counted manually and images can be annotated (saved in log file)

Configuration

  1. Start the macro in Fiji under Plugins-> Fiji-Tools-for-HCS->Fish Embryo Screen->
  2. Macro Select ROI for Segmentation
  3. Select the folder of Opera images (.tif; usually Zmax folder)
  4. Select the folder for result ROIs (usually select same folder)
  5. Dialog “Conditions”
    1. Specify the image format (only tif images allowed, usually from previous macro for tiling Opera images).
    2. Adjust numbers of channels
    3. Define start well (macro can be terminated and later continued from that well number on)
    4. Check if all found .tif should be shown in log file (helpful for filtering)
  6. Select the channel to use for drawing ROI
    1. Specify a tag/text that must be present in the file/path name of the files that will be opened
  7. Window ‘Array’ and a dialog “Action Required” will open
    1. Window ‘Array’ displays the files found
    2. If you are done with the file list, press ‘OK’ to go on or ‘Escape’ to stop macro
  8. File by file will be opened and the following options can be selected:
    1. Analyse image? If unchecked, next image will be opend
    2. Do manual counting? If checked an additional manual counting of objects will be enabled
    3. End script session? If checked the macro will be terminated normally (log file will be saved correctly)

Drawing ROI

  • Polygon tool will be selected by default, but this can be changes by used
  • Use zoom (+/-) and adjust brightness to display the image in the best way to draw ROI
  1. Draw ROI and close the ROI by double-click
  2. Multiple ROIs are possible by holding SHIFT
  3. Once ROI is drawn go on by clicking in window "Select region (ROI)..." OK button
  4. The ROI is shown in the ROI Manager, but this window can be ignored
  5. Specific annotation that is written to log file: Fish is dead? Need re-imaging? Flag? as free-text annotation

Counting Objects Manually

  • If "Do manual counting?" option is selected in "Analyse image?" window manual counting is enabled before drawing ROI
  • Multi-point tool will be selected by default
  • Use zoom (+/-) and adjust brightness to display the image in the best way to count objects
  1. Select as many objects by clicking in the image
  2. Selected objects and their number will be displayed
  3. Once ROI is drawn go on by clicking in window "Select all object manually..." OK button
  4. Window "..._points" will open with selected points on black image (could be used for merging or documentation)
  5. Object list is saved as a .txt file with the tag "...manualHSCcount.txt" (can be used for further analysis)
  6. The macro will continue with the drawing ROI mode (see above)

Output of the macro

The macro produced the following outputs:

  1. .zip, ROIs with the tag "ROIset" that can be loaded with the macro Macro_Segment2D_in_ROI.ijm
  2. Log_*.txt, log file as text file with the processed images and manual annotations for each image (can be analysed further)
  3. .txt, manually counted object list with the tag "manualHSCcount" (optionally, can be processed further)
  4. All parameters set in the script and the files that are saved will be printed in log window and a log file (.txt) with time stamp will be saved in result folder

Issues

  • no issues

Code

The code you can find here.

Latest changes

  • fifth release 07-04-2016: release with puplication of paper in JBS
⚠️ **GitHub.com Fallback** ⚠️