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 3D point-cloud on black background with multicolored translucent bounding boxes along a curved line

 

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 window showing red brain slice image on black background with software side panels

 

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 header showing anaconda.org and Anaconda Cloud header with Download Anaconda link
  3. Click on Download
    Anaconda Individual Edition page titled Your data science toolkit with a 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 64-Bit Graphical Installer (466 MB)
    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.
    Filename bar reading Anaconda3-2020.07-Windows-x86_64.exe with green circle icon
  2. Run it and press the Next button on the setup dialog.
    Welcome to Anaconda3 2020.07 (64-bit) Setup window showing setup text and Next button
    Note: The Python release must be at least 3.8.
  3. Click on the I Agree button to accept the License Agreement terms.
    License Agreement window displaying agreement text with I Agree button highlighted
  4. Select the Just Me option.
    Select Installation Type window showing Just Me (recommended) selected and Next button
  5. Press the Next button to complete the installation.

Install the Anaconda environment

  1. Select the Environments tab in Anaconda:
    Anaconda Navigator window with Environments highlighted in left sidebar and CMD.exe Prompt and Datalore tiles
  2. Select ‘Import’ the Environment on the bottom:
    Toolbar with Create, Clone, Import (highlighted) and Remove buttons
  3. Import the skeleton environment from the .yml file on your computer, which can be downloaded from here:
    Import Environment dialog showing local file 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...', 'Plug-in Manager', 'Task Monitor'
  2. On the left panel, click on the Scripting item.
    Preferences sidebar with 'Scripting' item highlighted
  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 path to arivis_skeleton_env
  4. Install the arivis package.
    Buttons row showing 'Install arivis package' button highlighted
  5. Run the Compatibility test.
    Buttons row showing 'Test Environment' button highlighted
  6. Dialog titled Python Compatibility Test showing Step 4: Required packages and a partial progress bar and Cancel button
  7. Test completed successfully:
    arivis Vision4D dialog: Installing the Python package succeeded, with Details and OK buttons
  8. Test failed:
    arivis Vision4D test dialog: Scripting test failed for conda environment — Connect to Vision4D; required packages missing
    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.
    Dialog 'Import Document Objects' showing Tags: Manual, 'Include compartments' checked, Outputs 'Import Document Objects'
  2. Select the Python Segment Modifier operator and use the Small square button icon showing three dots button to upload the operator script.
    Python Segmenter panel with Script field empty and ellipsis (...) button outlined in red

Python Segment Modifier panel with Script '...\segment_object_into_3D_bc', Input_Tag Manual, Input_channel 1, widths 200 and 100, Outputs 'Python Segment Modifier'

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 with a curved column of multicolored square markers along the right edge

Impressum
Carl-Zeiss-Strasse 22
73447 Oberkochen
Germany
Legal