ZEISS Microscopy Knowledge Base
Help
ZEISS Microscopy Knowledge Base

Creating freely XY oriented sub volumes

This guide explains how to create a sampling volume (ROI) freely oriented along X and Y axis.

The application uses a Python script to create single or contiguous sub-regions that can be used as ROI for further analysis. 

Tilted multicolored segmented bar with small green dots and two green clusters below on black

Opening the working dataset

  1. Select Open... from the file menu.
    File menu showing Open... option highlighted with CTRL+O shortcut
  2. Select the dataset from the file browser.
    The dataset is a multi dimensional, discrete, representation of your real sample volume. It can be structured as a Z series of planes (Optical sectioning) of multiple channels (dyes) in a temporal sequence of time points (located in several spatial positions).​
    Usually, the dataset shows a single experimental situation (a complete experiment can be composed by several datasets). The datasets are available as graphic files saved in plenty of file formats (standard formats as well as proprietary formats)​.
    Note: The dataset is visualized according to the current rendering setting parameters. Refer to the arivis Pro Help for more details.

Software GUI with 3D volumetric rendering of green and red segmented objects on a grid, left-side tool panels and color scale

Drawing the reference ROI

  1. Switch the Viewing area from 4D to 2D view mode.
    Toolbar with five square buttons: filled blue rectangle, grid, 3D cube, info 'i', and display screen icon
  2. Select the Draw Objects tool.
    Row of gray toolbar icons including curved arrow, pointer arrow, yellow circle, hand, globe, and blue circular tool
  3. Select the Brush tool.
    Toolbar row with save, copy, undo, pointer, and drawing tool icons on gray background
  4. Draw the 2D ROI over any Z plane. Use the Erase Brush to correct the ROI if necessary.
    Black background with multiple red fluorescent round clusters and a large translucent blue elongated ROI outlined in light blue
  5. Press the green icon to confirm the ROI.
    Small toolbar showing document and editing icons with green check and red X buttons
    Red elongated rounded rectangle inside dashed white selection box over three red-blue speckled circles on black background
    The TAG Manual is now available in the data table.
    Tags: 1 panel showing checked Manual checkbox and a search field

Loading the Python script

  1. Open Python Script Editor. From the Extra menu, select Script Editor.
    Extras menu dropdown listing Preferences..., Plug-in Manager, Task Monitor, Run Script..., Script Editor
  2. Load the Free-Oriented Sub-volume Python Script.
    Script Editor - Script1 title bar showing menus File, Edit, View, Script
  3. Browse the folder on which the file has been saved.
    File menu with 'Open...  Ctrl+O' highlighted, 'New  Ctrl+N' above, 'Open Sample' and 'Close  Ctrl+F4' below
Python code screenshot with highlighted USER SETTINGS block showing TAG_DESCRIPTOR = Manual and FIRST_PLANE = 3
Python script code overview

Only the parameters located in the USER SETTING area can be modified. Don’t change any other number, definition or text in the code outside this dedicated area.

Setting the script features

To define the contiguous sub-regions (sampling volume) features, few parameters of the script should be adjusted to match your analysis needs. These parameters are located in the code area labeled as USER SETTING.

Screenshot of USER SETTINGS code showing FIRST_PLANE = 3, LAST_PLANE = 10, SIZE_IN_VOXELS = False

  1. Set the Z planes range.
    FIRST_PLANE defines the lower Z plane of the sub-regions ROI.
    LAST_PLANE defines the higher Z plane of the sub-regions ROI.
    The values of -1 set the Z planes range equal to the whole volume depth (total number of Z Planes available).
    Code lines: FIRST_PLANE = -1 and LAST_PLANE = -1
  2. COMPUTE_MAIN_BOX = True enables the creation of an additional ROI having the same sizes of the total subregions ROI size.
    Code screenshot showing COMPUTE_MAIN_BOX = False
  3. NUM_BOX_LENGHT defines the number of sub-regions along the main axis (the longest one). NUM_BOX_WIDTH defines the number of sub-regions along the minor axis (the shortest one).
    Code screenshot showing NUM_BOX_LENGHT = 14 and NUM_BOX_WIDTH = 2
    Note: Set the number of sub-regions accordingly to the total size of the reference ROI. Don’t create boxes too small.
    Examples:
    NUM_BOX_LENGHT = 10
    NUM_BOX_WIDTH = 1
    3D view of stacked multicolored rectangular blocks with scattered blue dots on black background
    NUM_BOX_LENGHT = 10
    NUM_BOX_WIDTH = 2
    3D view of segmented multicolored rectangular prism with scattered blue dots on black background
  4. SIZE_IN_VOXELS defines if the size of the Sub-Volume is expressed in metric unit (True) or it is calculated from the reference ROI size (False).
    Code snippet showing SIZE_IN_VOXELS = False, SIZE_BOX_HOR = 10.0, SIZE_BOX_VER = 30.0
  5. SIZE_BOX_HOR and SIZE_BOX_VER defines the Sub-Volume XY size in microns. The sizes are referred to a single box.
    SIZE_IN_VOXELS must be True to create the box in microns.
    Note: NUM_BOX_LENGHT and NUM_BOX_WIDTH are also involved in the metric Sub- Volume creation.
    Examples:
    SIZE_IN_VOXELS = True
    NUM_BOX_LENGHT = 1
    NUM_BOX_WIDTH = 1
    SIZE_BOX_HOR = 10 (microns)
    SIZE_BOX_VER = 30 (microns)
    3D render of a long teal rectangular block on a black background
    SIZE_IN_VOXELS = True
    NUM_BOX_LENGHT = 3
    NUM_BOX_WIDTH = 2
    SIZE_BOX_HOR = 5 (microns)
    SIZE_BOX_VER = 10 (microns)
    3D render of six colored rectangular sub-blocks arranged in two rows on a black background

Running the Python script

Run the Free-Oriented Sub-volume Python Script by pressing the Run Script button or pressing the F5 key.

Toolbar with Run Script button and Hide Output Pane, tabs labeled Skeketon_RevB.py and Free-Oriented Sub-...

Script menu showing Run Script   F5 and Run File   CTRL+F5 options

Note: Activate the Output Panel, if not already displayed. The status of the script execution (errors including) will be visualized here.

Toolbar with Run Script button and Show Output Pane option

Script output panel displaying lines: starting script..., Script is running ........, time: 1.34400010109, script finished.

Impressum
Carl-Zeiss-Strasse 22
73447 Oberkochen
Germany
Legal