Setting Up a View
Scuba attempts to provide default values for view settings so that you can simply load data, make a few clicks, and start navigating it, but there are times when you want to make specific changes and customize your view.
Data Collections, Layers, and Views
It helps to know how scuba creates views of data out of pieces of data.
Data collections are volumes or surfaces or other major data types and their associated data, like ROIs. A data collection might be one volume and a few ROIs, or just a volume. Creating a new ROI for a volume adds it to the volume's data collection. Loading a new volume or surface creates a new data collection.
A layer is rendering of a data collection with certain attributes. A layer can draw a volume in grayscale or with a color table, using a certain opacity, and with different brightness and contrast settings. Normally, there is a one-to-one correspondence between data collections and layers, and they even have the same name.
A view is a collection of layers that are drawn, composited, to an area in the scuba graphics window. A view has 10 draw levels, and a layer can be set at each level. They are drawn from 0 - 9 with higher numbers on top. For example, put a volume into level 0 and a surface into level 1 so the surface will draw on top of the volume.
Views are always in RAS 'world' space. This is different from index based viewers like tkmedit. Volumes are 'registered' into RAS space based on the origin specified by the scanner. Therefore, when you load up a volume, it may appear off-center in the view. (These RAS coordinates correspond to the 'scanner coordinates' in tkmedit.)
Configuring a View
To make a view, load your data collections, configure your layers, and then set the layers in the views. Scuba does some of this automatically for you, for example you should normally not have to set draw levels in views.
If you specified data on the command line, it may not be ordered like you expect in the view. You can change the data collections in the view draw level slots in the Views panel. Each draw level has a pull-down menu in which you can select a layer. The layer name will be the same as the data collection name by default.
Each level has three columns of checkboxes for configuring whether or not it reports information in the label area (Inf), whether or not it is locked when shuffling (Lckd), and whether or not it is visible at all (Vis). These settings are tied to the levels, not the layers themselves.
The pull-down menu at the top of the Views panel shows the view you are configuring. The two numbers are the column and row position of the view, with the top left view being 0, 0. You can also see a view's column and row by moving the mouse inside that view and looking at the information area.
The Linked checkbox allows you to link views together so that certain navigational changes made in one view apply to all of them.
The ocked on Cursor checkbox allows you to force a view to stay centered on the cursor, which is particularly useful in the 2x2 view configuration to look at the same point in multiple orientations.
The Transform pull-down menu allows you to specify a viewing transform. Note that this is applied to the view; it's not a data or volume transform (this is in the Data panel) and it's not used to change the slice plane (this is done with the plane tool).
Use the Copy Layers to Other Views button to copy the draw level settings in this view to other visible views.
The In-plane increment specifies how much the view changes when the move in and out keys are used. Normally it is set to the smallest in-plane voxel size of all the volumes in the view.
2D views (which are currently all scuba supports) have an in-plane setting for selecting which 'slice' they are displaying in the 3D space. You can select this with the in-plane buttons in the toolbar: for x plane, for y plane, and for z plane.
Additionally, you can show multiple views to view different orientations simultaneously. You can split the window into 4 equally sized views with the button and one large view with three smaller ones with the button. Use the single view button to go back to normal.
While looking at multiple views, you'll see colored lines going through the views. Each view has a corresponding colored square around its boundary. For example, the bottom right view will have a yellow box around it. In other views, you may see a yellow line, denoting the plane that the yellow view is showing. For an example of this, see the screen shot in ScubaInterface.
Additionally, only one view will be actively receiving keyboard commands. This is the current view, and is denoted by a wider green line drawn around it. To change the active view, click in a different view, or use the appropriate keyboard command to toggle the current view (see the Edit->Preferences dialog to set the key).
Configuring a Layer
Use the Layers panel to set up the rendering of a data collection in a layer. Select the layer to be configured in the pull-down menu at the top of the panel. You can use the edit field beneath it to change the label for this layer.
The opacity slider is available for all layers and controls the opacity at which a layer is drawn. The rest of the controls in this panel are similarly self-explanatory.
Note that different options will be available depending on what kind of data collection this layer is rendering.
Specific controls for layers are discussed later on in the ScubaWorkingWithData subsections.
Saving the Setup
Because there are so many ways to configure a view, scuba allows you to save a scene configuration file that allows you to replicate the current setup. Use the File->Save Scene Setup Script... command to generate a script. This is actually a Tcl script that uses scuba's scripting interface to configure the scene; you can, if you wish, name the file generated with a .tcl suffix to reflect this face. This script can be run from the command line to load up the same data and replicate the view setup. Furthermore, you can use this script as a base to create your own generalized scripts to automate loading of other data.
To run a script from the command line:
scuba -script my-scene-setup.tcl