CellViewer

Throughout the MIEN documentation, the Cell Viewer will often be referred to as CV, and the syntax CV->Menu->Option will be used to mean "Select the choice named 'option' from the menu named 'Menu' in the menubar on the Cell Viewer window".

Starting CellViewer

Start the GUI using the command mien -a data. Optionally, you can append the name of one or more data files to open at the end of the command.

Loading data

If you didn't pass in the names of any data files, there are two other ways to load data into CV; Drag and Drop, and the File menu.

To load data by drag and drop, drag a local file from your Desktop or from a graphical file manager, and drop the file onto the black graphing area in the center of the Data Viewer. Dropping files here will cause CV to open them in append mode. This means that the data in each file will be concatenated with any data that is currently open in CV.

To load from the File menu, use File->Load, File->Append, and File-Append Subset. Each of these commands will open a file dialog where you can select a file to open, and will import data from that file. In the case of "Load", these new data will replace any existing data. In the case of "Append" they will be concatenated with the existing data. "Append Subset" allows you to choose parts of a complex document for import, rather than importing the entire contents. "Load" is exactly equivalent to "New Document" followed by "Append", so if you would like to "Load Subset", just call "New Document" before calling "Append Subset".

If you attempt to load data and nothing displays, check your terminal for error messages. If the file loaded correctly, but no elements display, you may have a file with no anatomical elements, or you may have your display filter set not to show the elements. Use CV->Display->Filter to change the filter. First, try selecting all element types in the filter.

Types of data to open

Navigating in CV

The core of CV is a MIEN GL graph widget. This is the black area that takes up most of the CV window. Most of the viewpoint navigation used in CV is actually provided by the graph itself (and will therefor be the same for any MIEN extension GUI that uses a GL Graph). Some extensions also provide navigation functions.

The View Volume. Perspective, and Depth of Field

CV is designed primarily for viewing microscopy data, and as a result, it has some behaviors that are different than most other 3D graphics applications. The main difference is that CV does not simulate perspective in an image. This means that the displayed width of an object doesn't depend on the depth of that object in the image. As a result, a 2D projection through the image is an accurate 2D projection (unlike in a perspective image), but there are fewer visual depth cues.

Also, CV supports a "depth of field" setting, which determines how many different depths can be displayed at once. By default, this is set very large, so all objects can be seen. If you reduce it, you will see a horizontal slice through the image, which can be "focused" up and down, much as you would focus through the depth of an object under a microscope.

Any scene displayed by CV is contained in a rectangular-prismic "view volume" positioned somewhere in space. What you see in the scene is determined by the relationship of this volume to the spatial locations of the displayed elements. CV describes the view volume using the following parameters:

CV provides camera controls, but some of the most commonly used and intuitive controls (such as "orbit") are designed to be "model-centric" (meaning that they do something to the thing you are looking at, rather than the place you are looking from. Under the hood, though, all navigation is implemented by changing the parameters of the view volume, and most measurements are based on them as well, so to understand exactly how commands work (for example in order to figure out why a command didn't do exactly what you wanted), it can be helpful to think about how the view is represented.

Directions in the 3D scene will be referred to as horizontal (left/right), vertical (up/down), and depth (forward/back). In the first standard view, horizontal corresponds to the X axis, vertical Y, and depth Z. Axis coordinates are absolute, however, and "horizontal", etc, are relative to the camera. Horizontal always refers to your left and right on your screen, vertical to your up and down, and depth to into and out of the screen.

Graph navigation

Key Bindings

A major difference between CV and many other viewers is that navigation is keyboard-centric, rather than mouse-centric. Many typical navigation tasks are performed using keyboard shortcuts. As of the time of this writing, the graph key bindings are as follows:

The precision of navigation keypresses can be changed by changing the "resolution" parameter in the graph configuration menu.

Mouse behaviors

Right clicking on the graph re-centers the view so that the point you clicked on becomes the center of the view volume in the horizontal and vertical dimensions. This is the usual method used for precise panning in CV. Right-clicking has no effect on the depth of field or depth position.

Left-clicking measures the location of a point. The point is marked with a dot, and CV prints the location of the point as 3 vectors position, forward, and up. The position of a left-clicked point is placed on the front surface of the view volume. If you left click a second time, CV also prints the distance between this click and your last. If you did not issue any graph movement commands between the clicks, this distance will be measured in the current horizontal/vertical plane of the graph, so a pair of left-clicks can be used to measure 2D projection distances in any particular projection.

Shift-left click selects a point in a Cell object. See object selection.

Shift-right click selects a point in a Fiducial object (See object selection).

CV Menu Commands

If you are using Mac OS, read note about Mac menu behavior.

CV has 6 menus: File, Display, Selection, Extensions, Spatial, and Python. Each is described in its own section below.

File Menu

Many of the functions in the CV file menu are standard to MIEN GUIs, and are described here.

The Apply Filter to File function is CV specific. This function removes elements from the current document if they are not currently visible in CV. Elements that will be removed include any top-level element that can't be displayed by CV at all, elements that have been hidden, and elements that are not displayed under the current display filter (display filters are described in the next section).

Display Menu

Selection

This menu provides functions for selecting regions in an anatomical cell model. It will only be useful in documents that have Cell elements. Many of the functions depend on having one or more points in the cell model selected, as described in the object selection section. In principal, all of these functions should work in documents containing multiple cell models, but they are only tested in documents containing a single detailed cell model. Some errors may crop up in compound documents, particularly if you place selection points in two different cells, and try to use functions (such as "Select Path") that try to find a connected route between these points.

A Note about sections

Selection in CV depends on the structure of a Cell element through the arrangement of Sections and the choice of a cell root. MIEN represents cell morphology using the concept of a morphological "section" as different from an anatomical point, or an electrical compartment. This is similar to the representation used by the Neuron simulation environment, and different then the representation used by GENESIS and other tools. By default, a Section is an unbranched cell process. If you load morphology data into CV, Sections are assigned in this way. Consequently it is possible to have very large sections, if a cell has few branches. Many of MIENs built-in functions for editing cells operate on sections, including CV's selection tools. The result may be that you can't always select what you want. For example, if you have a long unbranched axon, you select a point in the middle, and you "Select Distal" the whole axon is selected, both distal and proximal to your selected point. This happens because the whole axon is a single section (since it is unbranched). Currently, the only solution to this issue is to edit your model to split the axon into two or more sections.

CV determines distal and proximal based on the cell root. This is the only section in a cell that has no parent section. Sections in a cell are arranged in a tree structure, with each section having zero, one, or more children, and a single parent, except for the root section, which has at least on child, and no parent. In most cases it is possible to express the same cell morphology using more than one tree, by choosing different roots. The anatomical concept of distal and proximal will only match the behavior of CV if the root section is also the cell body. What section is root depends on the method of digitizing, and, for many methods, the order of digitization. For example, a model imported from a Neurolucida file will have the root section assigned as the section containing the first point the Neurolucida user clicked on when digitizing. If this isn't the cell body, you may want to edit the model to change the root section to the cell body.

MIEN should provide functions for splitting sections and re-assigning the cell root quickly. Previous version offered these functions as built-in CV commands. Future versions will offer them as CV Extensions. As of the time of this writing, the functions are in the middle of being ported from built-in to extension, and the current release of MIEN doesn't offer them at all. This issue will be resolved as soon as possible.

Extensions

This menu provides access to several functions for managing extensions, and to functions that are provided by installed CV extensions.

For other functions in this menu, you will need to see the CV extension documentation

Spatial

This menu provides spatial data processing functions, including some defined by MIEN, and those defined by any loaded extensions. See the MIEN SPATIAL documentation, or the documentation for the relevant block for usage of each function.

The layout of the menu is analogous to the DV DSP menu

Python

The menu lets you launch Python interactive sessions that interact with the CV gui. See the general-purpose gui documentation.

Object Selection

CV supports two kinds of object selection, cell and fiducial selection, using different mouse clicks (shift-left for cell, and shift-right for fiducial). Other element types, such as spatial field and image objects can't be mouse-selected. The two types of selection are handled separately. If you shift-left-click on a fiducial line, the nearest point in a cell element will be selected, even if it is quite far away.

CV keeps a list of the most recently selected points, which is used with the functions in the Selection menu. These points are cell selections only. Currently the only uses of fiducial selections are for measurement, and for interactive identification of landmarks by the user.

Selection of either type of object works in the following way:

Because of the first property, you might select a point that is behind the object you are looking at. If you have trouble with this in a dense scene you can zoom in to get better resolution. You can also use the first property. Hide plots you don't want to select, or reduce the depth of field. Orbiting the scene may also help you to find a viewpoint where the objects you want to separate are clearly separated in the plane of the image.

Fiducial selection

Fiducials are spatial annotations to an anatomical data set, which indicate the locations of anatomical landmarks. They are typically used to provide a comparable reference frame for data collected in different experiments. They can also be used to mark regions of interests, such as regions of a network that are hypothesized to have a particular function.

MIEN represents all fiducials as a elements of type Fiducial. These elements contains point data and optional labels. They also have an attribute called "Style" which determines how they are displayed. Fiducial styles include lines, spheres (points with an optional diameter), and labeled points (points with a textual label attached to them).

Fiducial selection treats all fiducial styles the same, and searches through all the visible fiducials in the document. Thus, if you click part way between a line fiducial and a labeled point, you could select either one - you will get whichever is closer.

When you select a fiducial, a single point within the fiducial gets selected. Note that line fiducials are drawn as lines, but are really composed of a list of points. If you click on the line between two points, the nearest of the points is selected. This could be some distance from the point you clicked on (also, if there is another fiducial nearer than either point, you will select that one - selection doesn't care that you clicked exactly on the line, it only knows about actual points in the data sets).

CV will mark the selected point with a (temporary) dot, and print information about the point. This information will look something like this:

-12.795, -102.390, 191.180, [4.340] (myfiducial[23]) (group - 7)

The first three numbers are the X,Y,Z coordinates of the point. The fourth number (in brackets) is the diameter associated to the points (depending on how they were digitized, even some line and label fiducials will have diameter information, although it is not used for anything). The first word in parentheses is the name of the fiducial object containing the point. This name could be used to find the fiducial element in the XML editor, or using a script. The number in brackets after the name is the index of the selected point in the fiducial's spatial data array. In the above example, this is the 24th point (since Python counts from 0) in a line fiducial. If the fiducial is a member of a display group, the final set of parentheses displays this group name. This line is in display group 7.

If you have previously selected a fiducial point, CV will also print something like:

Distance from last point: 236.4858

This is the euclidean distance, though space, between the two selected points. Unlike the behavior of a CV measurement (left-click), this distance is in full 3D, since both selected points have absolute 3D locations. This distance won't depend on any rotation or control of the display.

Cell selection

Cell elements represent the morphology of cells (usually neurons). Cells tend to be more complex than fiducials, often containing a few thousand sections and many thousand points. For performance reasons, CV will only search for selections in one cell element at a time. Typically, users will build models of different cells in separate documents, and by the time these are combined into a single document, cell selection won't be needed anymore. If you do need to select a cell point in a document, you can, but CV will ask you to choose which cell to select in from a menu when you make a selection. If you click on a point in cell A, but say you want to select a point in cell B, you will get the closest point in B, even if it is far away.

When a point is selected, CV will push the selected point onto the list of selected points, where it can be used by the various functions in the Selection menu. CV will also mark the point with a temporary dot, and print information about the point. The point description looks like this:

-14.784, -177.270, -22.618, [14.440] (ten3.section184(0.552))

The first four numbers are the same as for a fiducial selection, X, Y, Z, and D (cells always specify diameter). The string in parentheses is the name of the cell, followed (after the ".") by the name of the Section element containing the point, followed by the relative position of the point in the section. This last number is similar to the section-relative coordinates used by Neuron. It is a number between 0 and 1, indicating how far along the section the point occurs. The point above occurs about 55% of the way from the proximal end of section184 to the distal end. This measure is calculated along the inside of the section, not in a strait line through space.

View Presets

CV view presets are saved view volume descriptions that can be returned to using a single key-press. Whenever CV loads a document, it calculates and stores three presets known as the standard views in addition, users can add their own presets using the f2 menu of the 3D graph (or the "viewpoints" extension from the extension menu of CV).

Pressing f2 brings up a dialog showing the view volume parameters and a name for the new preset. You may edit the parameters if you like, but this usually isn't needed. The parameters are initialized to the current view, so you can navigate to a desired view using the GUI controls, press f2, enter a preset name, and select OK to save the current view as a preset.

Once you have presets saved, you can access them using the "5" key. If there is a single preset, pressing 5 immediately sets the view to that preset. If there are several, pressing 5 opens a dialog where you can select a preset view from a list.

You may set any number of preset views that you want. Normally, preset views are not persistent between CV sessions. To save your views, you can use the "Save Presets" option in the f1 menu. In a subsequent session, you can use "Load Presets" from the same menu to get your view presets back. (You can also use the viewpoints CV extension).

NOTE: a rather serious bug in view preset behavior was corrected in MIEN revision 654. If your presets are behaving incorrectly, try an update to the newest development revision.

Standard Views

The standard views act like view presets, but are automatically set for any document. There are three standard views, called Z, Y, and X. In a standard view, the camera is placed looking at the center of the visual scene. It is moved away along the indicated axis, far enough that all objects are visible. Depth of field and extent are set so that all objects are visible.

In the Z standard view, the camera is displaced along the Z axis, so the plane of the screen (the horizontal/vertical plane) is the X,Y plane. In the Y standard view, the screen is in the X,Z plane, etc. The Z standard view is (usually) the most similar to the view you would see in a microscope. It is sometimes referred to as plan view, and it is the default view that you will see first when opening a document in CV.

To access standard views, use the keys 1,2, and 3. "1" sets the Z view, 2 X, and 3 Y. Standard views are a good way to find the scene again, if you get "lost" while moving the camera.

Note that the center of a standard view is the center of the bounding prism containing all the displayed elements, not the origin. If you have two objects displayed at (100,0,500), and (700,10,200), the center of the plan view will be (400, 5, 350), not (0,0,0).

f1 Graph Menu

Pressing f1 in the 3D graph opens a configuration menu. This menu relates to the 3D graph itself, not to CV in particular. Features often used from this menu are being added to CV as extensions, but currently some operations you will want are only available from this menu.

Preferences

CV->File->Preferences launches a dialog that lets you set some preferences that control how CV displays scenes.

 

Last edit: 05/29/09

Index