Segment Write

Introduction

The Segment Write module is available as a part of 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 software package to use this module. The module interacts with Volume Viewer, a Chimera module for visualizing 3D volume data.

Segment Write uses Chimera's VolumeData data objects (see Volume Data module in Chimera) and saves the data in different file formats.

The Segment Read module in the Segment Volume package can read data in additional data formats such as the RawIV file format, and can be used to save those data format files using the Segment Write module.

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 SegmentWrite. To list the module under Chimera's Tools menu, add the directory - containing - the SegmentWrite 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 SegmentWrite 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 Write 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 SegmentWrite
  >>> SegmentWrite.show_seg_write_dialog()


Supported input data formats

Chimera's data formats

The Segment Write module currently supports all of Chimera's VolumeData data types, handled by the Volume Data module of Chimera.

Segment Read supported data formats

Additionally, the Segment Read module (available with the Segment Volume package) can be used to enable Chimera to read additional data foramts.


Supported output data formats

MRC data formats

The Segment Write can write data in MRC format. The MRC format specifications and our implementation of the specifications are listed in mrc_specs.py.


Dialog panel

Input data section

The Segment Write dialog panel has three 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 Write 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.

If the Segment Read module of the Segment Volume package is available, it can be used to read additional data formats not supported by Chimera.

Save/Output format section

Pick the output data format, and go to that row (currently, only the MRC data format is supported). Enter the output file name in the output entry box and click on Save button. This will save the output file in the current Chimera directory (usually the directory from which Chimera was started).

Alternatively, you can click on the Save As button and specify the output file name and output file directory.

Output data section

The output data section has an Output data menu that lists the current saved 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 Write dialog. The Help button opens this help page.


Command line options (for advanced users)

The command line options can be used in Chimera's IDLE tool (under Programming tools on the Tools menu).

Save a VolumeData grid object of volume data (for advanced users)

Volume data in Chimera is handled by the Volume Data module in Chimera, and is represented as a grid object. To save a grid object in the different supported formats, simply type:

  >>> import SegmentWrite
  >>> SegmentWrite.mrc_write.save_mrc(grid_object, path) # MRC data format

For further help, type:
>>> help(SegmentWrite.mrc_write.save_mrc) # MRC data format

Save a 3D matrix of volume data (for advanced users)

Volume data in Chimera is handled by the Volume Data module in Chimera, and is represented as a grid object. The grid object essentially contains the header info. You can therefore, read a volume data file, make modifications to its pixel values in the data matrix, and save the modified data matrix along with the original header (grid_object) in the different supported formats. To do so, simply type:

  >>> import SegmentWrite
  >>> SegmentWrite.mrc_write.save_mrc_matrix(grid_object, path, matrix) # MRC data format

For further help, type:

  >>> help(SegmentWrite.mrc_write.save_mrc_matrix) # MRC data format


Notes

Output data formats

Currently, only the MRC output data format is supported.


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