The Segment Simple module is a part of the Segment Volume package used for segmentating volume data. 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 interacts with Volume Viewer, a Chimera module for visualizing 3D volume data.
Segment Simple Segment Simple uses simple regions such as a cuboid to segment out the region inside the volume data (MRC format) and create a new volume data file (MRC format) with the segmented region. The simple regions can be specified using a set of paremeters or drawn using the mouse.
Note: This version of the Segment Volume package is a pre-release version.
The module files are stored in the directory SegmentSimple. To list the module under Chimera's Tools menu, add the directory - containing - the SegmentSimple 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 SegmentSimple directory. This will list the tool under AIRS on the Tools menu.
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 Simple 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 SegmentSimple
>>> SegmentSimple.simple.show_seg_simple_dialog()
The Segment Simple module currently uses EMAN and Chimera software and hence the input/output data formats are restricted to those supported by both these software packages.
The Segment Simple dialog panel has six main sections. The first section is the Input data section. The 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 the 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 Simple 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.
This section allows you to pick a mouse button to draw the simple regions on the Chimera main window. To enable the mouse mode, the checkbox before the Use button needs to be checked. This checkbox is activated only if the data item on the Input data menu is displayed.
The mouse button menu allows you to pick a mouse button to draw the selection region. The outline of selection region is displayed in red.
The Delete button deletes the selection region if present. The Show and Hide buttons show and hide the selection region respectively.
More on using the mouse to draw the region follows later.
In this section, you can pick the type of selection region you want to consider for segmenting. Currently, only the Box (cuboid) region and Circle (sphere) are supported. To select the selection region type, check the appropriate checkbox.
After selecting the region type, a panel for selection region parmaeters is activated, where you can enter the parameters in pixels. For example, the Box selection type is specified using the Box Size and the Box Center values in pixels units.
The Circle selection type is specified using a bounding box with the Circle Size and the Circle Center values in pixels units. If the bounding box is not a cube, then the smallest dimension is used as diameter for the circle (sphere) region.
Hitting the enter key in any of the parameter entry boxes will display the selection region and update the parameters in Angstroms if the parameters in pixels are valid selection parameters and if the data is displayed in Chimera. The values of the parameters in Angstrom units are read-only and cannot be directly edited.
The values of the parameters are automatically updated when the mouse is used to draw a selection region or to move the selection region. The paremters are updated for the selection region specified by the Choose type radiobutton under the Segmentation Info section.
In this section you can specify the output region of the volume data. This can be the same as the segment region or the same as the original region or a custom region where you can enter the Size and Center parameters in pixel units.
To pick the output region type, simple pick one of the options on the Output region type menu. Picking the custom region will activate the Size and Center parameter entries. The corresponding values in Angstrom units are displayed if the parameters in pixel units are integers, and size is positive.
If the output region is larger than the segmented region, the extra space is padded with zeros.
In this section, the actual choice of the segmentation region type is made using Choose type radiobutton. The File MRC specifies the name of the output file, and hitting the Apply button performs the segmentation.
After hitting the Apply button, the parameters of the corresponding selection region (as specified by Choose type radiobutton in the Segmentation Info section) are checked for validity. The parameters of the output region are also checked to see if the output region encloses the segmented region.
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.
The Close button closes the Segment Simple dialog. The Help button opens this help page.
For the Box selection region parameters, Size parameters should be positive integers corresponding to size of the box in terms of pixels (in object coordinates).
Center parameters should be integers corresponding to the center of the box in terms of pixels (in object coordinates).
Once the parameters have been entered correctly, if the data is shown in the Chimera viewer, then pressing the Return or Enter key will display the box region selection, and update the parameters in Angstrom units.
For the segmentation operation (Apply button), if the box region is completely outside the data region, then the parameters are considered invalid.
For the Circle selection region parameters, Size parameters should be positive integers corresponding to size of the bounding box of circle (sphere) in terms of pixels (in object coordinates).
Center parameters should be integers corresponding to the center of the bounding box in terms of pixels (in object coordinates).
Once the parameters have been entered correctly, if the data is shown in the Chimera viewer, then pressing the Return or Enter key will display the circle region selection (using bounding box), and update the parameters in Angstrom units.
For the segmentation operation (Apply button), if the bounding box region is completely outside the data region, then the parameters are considered invalid.
The output region parameters should all be integers, and should be positive for Size parameters. The parameters in Angstrom units are automatically updated if the above condition is satisfied.
However, for the segmentation operation (Apply button), if the output region does not enclose the segmented region, then the parameters are considered invalid.
To draw a region for the , ensure that the mouse selection button in the Selection region section is checked, and that the data on data menu (Input data section) is displayed.
For the Box selection region , simply click on the Chimera viewer using the correct mouse button and drag to draw the region. The selection region is displayed in red.
To move the box, place the mouse slightly away from the box and drag the mouse. To move a face of the box, click on the face and drag the mouse.
For the Circle selection region , draw the bounding box similar to drawing the Box selection region described above.
Let us say, we have an input MRC file input.mrc of size 128 by 128 by 128 pixels and we want to segment out the cuboid region centered at pixel location [48,48,48] in object coordinates, and of size 32 by 32 by 32 pixels. (Note that the origin is considered to be at one of the corner points of the data set for this example.).
Use the Open button in the Input data section to add the file to the menu. The size of the data set is displayed. There, are several ways of proceeding from here:
Jump to the Selection region parameters, set Choose region checkbox to Box, and enter the values [32,32,32] for the box Size parameters, and [48,48,48] for the box Center parameters.
If our data set is displayed in Chimera (use Chimera's Volume Viewer), then hitting the Enter or Return key would automatically display the box selection in red.
Now, hit the Apply button in the Segmentation Info section, after setting the Segmentation type to Box. To view the output, hit the Show button in the Output data section.
Go to the Selection section, and check the mouse button box and pick a button from the mouse button menu.
Use the mouse to draw a box in Chimera viewer. Dragging the mouse on a face of the box will move the face of the box. Dragging the mouse (away from the box) will move the entire box. You can use the other mouse buttons to change the orientation of the entire object.
The Selection region parameters section will automatically update itself and show the box Center and Size parameters as you stop drawing in Chimera viewer.
Now, hit the Apply button in the Segmentation Info section, after setting the Segmentation type to Box. To view the output, hit the Show button in the Output data section.
The EMAN software package is required to use this module. One of the common problems when using this module, is that of EMAN's integration into Chimera's environment. This module interacts with EMAN using the Python script file boxes.py, which is executed from the OS command line. So, before using the module, ensure that the EMAN's Python libraries are available from within Chimera's Python environment.