ZEISS Microscopy Knowledge Base
Help
ZEISS Microscopy Knowledge Base

Segmenting objects into equal parts in arivis Pro

This guides goal is to guide the scientists in the workflow for segmenting objects into smaller equal parts and create 3D bounding-box objects surrounding them. The application note includes the steps to import the data and object to be segmented.

Red translucent elongated shape on black background with a curved row of multicolored 3D boxes along its left side

 

Import the image set(s) in arivis Pro

  1. Import the experiment data into a single image set by simple drag-and-drop into arivis Pro window.
    Arivis Vision4D 2D Viewer showing a red Channel #1 image preview with color settings and navigator panel

 

Source: The above example data was made available through the courtesy of

Mehwish Anwer, PhD

Team of Professor Cheryl Wellington

University Of British Columbia

Download the Anaconda package

  1. Open the Anaconda web pages using the following link: https:/anaconda.org
  2. Select the Download Anaconda item Browser showing anaconda.org header with Anaconda Cloud logo and 'Download Anaconda' link highlighted
  3. Click on Download
    Page showing 'Individual Edition' and heading 'Your data science toolkit' with highlighted 'Download' button
    Note: The Individual Edition is Open source and freely distributable.
  4. Click on 64-bit Graphical Installer
    Anaconda Installers page showing Windows column with 'Python 3.8' and '64-Bit Graphical Installer (466 MB)' highlighted
    Note: The Individual Edition is Open source and freely distributable
  1. The download task starts.

Install the Anaconda package

  1. Open the Download folder and locate the Anaconda3 setup file.
    Anaconda3-2020.07-Windows-x86_64.exe filename with green circular icon
  2. Run it and press the Next button on the setup dialog.
    Welcome to Anaconda3 2020.07 (64-bit) Setup dialog with Anaconda logo and Next and Cancel buttons
    Note: The Python release must be at least 3.8.
  3. Click on the I Agree button to accept the License Agreement terms.
    Anaconda3 2020.07 (64-bit) License Agreement dialog showing agreement text and highlighted I Agree button
  4. Select the Just Me option.
    Select Installation Type dialog with 'Just Me (recommended)' selected and Next button highlighted
  5. Press the Next button to complete the installation.

Install the Anaconda environment

  1. Select the Environments tab in Anaconda:
    Anaconda Navigator window showing Environments tab highlighted and CMD.exe Prompt and Datalore cards
  2. Select ‘Import’ the Environment on the bottom:
    Toolbar showing Import button highlighted among Create, Clone, Import, Remove icons
  3. Import the skeleton environment from the .yml file on your computer, which can be downloaded from here:
    Import Environment dialog showing Local drive path to arivis_skeleton_env.yml and new environment name arivis_skeleton_env

Test python Registration environment in arivis Pro

In order to run the image registration script, the corresponding python environment should be already installed on the workstation using the Anaconda distribution. Detailed instructions on how to set up this environment are provided in Install Anaconda Python for Vision4D article.

  1. Run arivis Pro (4.1.1 and next release) select the Preferences item from the Extras menu.
    Menu showing Extras with Preferences... selected and items Plug-in Manager and Task Monitor
  2. On the left panel, click on the Scripting item.
    Preferences Scripting pane with Scripting option highlighted in left navigation
  3. Enable the Anaconda Environment option. Browse the Anaconda3 installation folder and select the arivis_skeleton_env created previously.
    Note: By default, the new environments are stored under the \envs folder located in the Anaconda3 installation folder  e.g. C:\users\xxxxxx\Anaconda3\envs\arivis_skeleton_env
    Python Environment dialog showing Anaconda Environment selected and environment folder arivis_skeleton_env
  4. Install the arivis package.
    Buttons row with Test Environment, Install arivis package (highlighted), and Uninstall arivis package
  5. Run the Compatibility test.
    Buttons row with Test Environment (highlighted), Install arivis package, and Uninstall arivis package
  6. Progress 43% dialog: 'Python Compatibility Test' Step 4: Required packages, green progress bar and Cancel button
  7. Test completed successfully:
    Dialog 'arivis Vision4D Python Package Installation' says 'Installing the Python package succeeded.' Details and OK buttons
  8. Test failed:
    Error dialog stating 'Scripting test for the conda environment failed. Required packages missing.' with Details and OK buttons
    Note: If the above error message is issued, try again to install the arivis python package.

Run the python script in arivis Pro

In order to run the script, the objects of interest should first be created and/or imported into the pipeline. We suggest first testing this operator on a small subset of the objects. Running it on the large dataset might take a few hours as well. The script can be downloaded here.

  1. Create or Import the object of interest that is to be segmented.
    Import Document Objects dialog with Tags Manual, checked Include compartments, Outputs Import Document Objects
  2. Select the Python Segment Modifier operator and use the Small square button icon showing three blue dots button to upload the operator script.
    Python Segmenter panel with empty Script field highlighted, ellipsis button, Outputs Python Segmenter

Python Segment Modifier panel with Script ...\segment_object_into_3D_bc, Input_Tag Manual, Input_channel 1, widths V200 H100

Input_Tag: object tag to use for segmentation.

Input_channel: channel to run the script on.

Width_in_pixels_vertical: Vertical width of the segments in pixels.

Width_in_pixels_horizontal: Horizontal width of the segments in pixels.

Visualization of the results

Once the script is executed, the segments with 3D bounding boxes will be displayed as objects. By default, they will be assigned random color to differentiate between the different objects.

Red fluorescent brain section on black background with a vertical arc of multicolored bounding-box tiles along its right edge

Impressum
Carl-Zeiss-Strasse 22
73447 Oberkochen
Germany
Legal