Loading the script
A startup package including the python script, the technical instructions and the test image is available on request. Contact your arivis local area sales manager to get more information about how to get the python script mentioned here or use the contact form on our website.
In the Script Editor, the script can be opened by dragging. the .py file into an open window, of by going to File > Open... and navigating to the script file.
Once loaded some parameters will need to be changed for your specific images.
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ USER SETTINGS @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# -----------------------------------------------------------------------------
# Stardist 2D - Script
# INPUT_CHANNEL channel with the target objects
# is only used to read/write the voxels
# ---> imageset.get_channeldata / imageset.set_channeldata# -----------------------------------------------------------------------------
INPUT_CHANNEL = 1 # <---- Count start from 0 (Ch#1 == 0)
# name of the new channel (skeleton storage)
OUTPUT_CH_NAME = "Stardist_" # Net_Skel_
#
#MODEL3D_PATH = "D:/Arivis_Dataset/Carlo Stardist/2021-05-10/3D/2021-04-22/models"
MODEL2D_PATH = "D:/Arivis_Dataset/Carlo Stardist/2021-05-10/2D/2021-05-03/models"
MODEL_NAME = "stardist"
# PARAMETERS YOU CAN CHANGE?
CURRENT_TIME_POINT = True
FIRST_PLANE = -1 # -1 == BOTTOM
LAST_PLANE = -1 # -1 TOP
#
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ END USER SETTINGS @@@@@@@@@@@@@@@@@@@@@@@@@@@@
Of specific importance are:
- Input Channel number (remember the first channel is channel "0"). This is to specify which channel to do the segmentation on
- Model Path and name. This will depend on your installation and the model you are using.
- Input range.
- CURRENT_TIME_POINT, if true only the current time point is analyzed, if false the entire time series.
- FIRST_PLANE, the first plane in the stack to be used for segmentation
- LAST_PLANE, the last plane in the stack to be used for segmentation
- Note that is both the first and last plane parameters are set to "-1" the script will use the full stack.
Once the parameters have been set the script can be saved and run.
Download Full "How to run StarDist within arivis Vision4D" PDF