Segment Mask

Introduction

The Segment Mask module is available as a part of the Segment Volume package. The module is a Chimera extension module. To use this module, the Segment Menu module of the Segment Volume package is required. You will need the Chimera and EMAN software packages to use this module.

The module helps you to generate simple 3D shapes such as cuboids, ellipsoids, cylinders, 3 and 4 sided pyramids, and cones. You can specify arbitrary sizes and orientations for these shapes and generate volume data in MRC format. The module is also useful to apply (add, multiply, etc.) a mask data file to the input data.

Note: This version of the Segment Volume package is a pre-release version.

More:


Startup

Listing the module

The module files are stored in the directory SegmentMask. To list the module under Chimera's Tools menu, add the directory - containing - the SegmentMask directory to Chimera's list of Tools.

To do so, open Chimera's main window, choose Perferences under Favorites menu, then choose the Tools category and then Add the directory - containing - the SegmentMask directory. This will list the tool under AIRS on the Tools menu.

Starting the module

To start the module from the Chimera menu, first you will need to ensure that the module is listed under Chimera's Tools menu. Then, click on Segment Mask in the AIRS menu, under Chimera's Tools menu.

Alternatively, you can use the command line tool in Chimera's IDLE tool (under Programming tools on the Tools menu), and type:

  >>> import SegmentMask
  >>> SegmentMask.maskmain.show_seg_mask_dialog()


Dialog

Input data section

The Segment Mask dialog panel has four main sections. The first section is the Input data section. The Data file menu and the Mask data file menu automatically lists available data regions in Chimera's Volume Viewer. To select a data set, simply pick an entry from this menu. The size of the data set in pixels is automatically displayed on the dialog, below the menu. If the data set is displayed in Chimera, then the Displayed value is set to Yes.

To open new models, click the Open button below either menu. This will open Chimera's Volume Viewer dialog and an Open file browser dialog. After adding the models, if the models are not listed on the data menu, click the Refresh menu button, next to the Open button on the Segment Mask dialog.

Alternatively, you can directly open new models using Chimera's Volume Viewer. Once again, if the newly opened models are not displayed on the data menu, hit the Refresh menu button.

Apply mask

To view the Apply mask section, check the Apply Mask checkbox at the top of the dialog.

You can select an input data file from the Input data file menu and then apply a mask to the input data, and save the output in a file specified by File MRC entry.

You can perform simple operations such as multiply the data in the input data file with the mask data, or adding the data in the input data file to the mask data. You can also perform binary operations such as binary addition and binary subtraction. For the binary operations, a simple threshold of 0.5 is used. Anything above 0.5 is set to 1 and anything below 0.5 is set to 0.

Create mask

To view the Create mask section, check the Create Mask checkbox at the top of the dialog. This section will allow you to create simple shapes of arbitrary size and orientation.

From the Mask Type menu, you can select the shape that you are interested. Shapes supported include cuboid, ellipsoid, cylinder, cone, 3 and 4 sided pyramid.

The diemnsions of the shape are specified in pixel units. Depending on the shape, two or all three parameters are required. The description of each parameter is specified for the shape selected on the Mask Type menu. For example, the cylinder is specified with just the first two parameters p0 - diameter and p1 - length. These parameters are specified in pixels.

In the Mask parameters section, the size of the volume data, the origin, and the step size can all be specified or inherited from the data on the Input data menu. To inherit the values, check the Inherit from Input Data checkbox.

The size is specified in pixels, the origin in Angstroms, and the step size in Angstroms per pixel. For a volume data model open in Chimera, you can view these parameters in Chimera's Volume Viewer dialog.

You can now specify the rotation and translation to be applied to the mask object. The translation is specified in pixels, and the rotation is specified in degrees using EMAN's Euler angle convention. You can use the Dock Manual to get an idea of the rotation and translation parameters that you might need in your case.

Within the shape, you can choose the pixel (voxel) values to be all 1 or to set it proporational to the radial distance from a central axis or a center point. To choose the former, select the Step option. To make the pixel (voxel) values vary radially, select the Radial option.

A new mask file is created when the Create Mask button is pressed. The file name is specified by the Mask MRC File entry before the button.

Output data section

The output data section has an Output data menu that lists the current segmented output files. To open or display the file in Chimera, click on the Show button. If more than one output file was created, then you can click on Show All button to open and display all the files on the menu.

The Hide button closes the model (associated with the file on the Output data menu) in Chimera, but leaves the entry on the Volume Viewer data menu unchanged. The Hide All button applies the Hide button to all the files on the output data menu.

The Remove All button removes all the entries on the Output data menu, but leaves the corresponding entries (if any) on the Volume Viewer data menu unchanged.

Other buttons

The Close button closes the Segment Mask dialog. The Help button opens this help page.


Example

Here, we have created a pyramid mask of size 96 x 96 x 96 pixels. The side length of the base of the pyramid is 32 pixels, and the height of the pyramid is 54 pixels. The pyramid is then translated by the vector (10,10,0) in pixel units and rotated along the azimuth by 20 degrees. The parameters are shown below.


Notes

Euler angles

If you are not familiar with the EMAN Euler angles, you could use the Dock Manual tool to figure out the right parameters for translation and rotation.

Combinations

You can create the simple shapes (cuboids, ellipsoids, etc.) and combine them to form more complex shapes. To do so, first, load two masks on the Input data menu and the Mask file menu respectively, and then under Apply mask section, use the Binary add button.


Segment Volume package (pre-release) - Segment Mask module
2005 April, Lavu Sridhar, Baylor College of Medicine