CTvox for Android Version 1.5
Contents Introduction... 1 Background... 1 Volume rendering... 1 Multi-volume rendering... 2 Transfer function... 2 Installing CTvox... 3 Creating and transferring volume data... 3 VXM file transfer using Dropbox... 4 VXM file transfer using a USB connection... 6 Using CTvox... 7 Rendering view... 7 Transfer function editor... 11 Multiple volumes... 13
1 Introduction The CTvox app brings 3D visualization of volumetric data using direct volume rendering to your Android device. Direct volume rendering is a visualization technique that allows intuitive and interactive exploration of 3D voxel data by selectively introducing transparency and color. Examples of 3D voxel data include (micro)ct and MRI scans and synthetic data resulting from numeric computations. Central to volume rendering is the concept of the transfer function: it governs the mapping of the original scalar data to a voxel's transparency and emission color, which are determining for the rendering's appearance. The following section offers a more detailed theoretical background on these concepts. To get started right away, skip to the section on installing CTvox, on creating and transferring volume data or on using CTvox. Background Volume rendering Volume rendering is a 3D visualization technique that works directly on the volume data, rather than relying on a geometric model built using this data as is the case in surface rendering. It allows to interactively make selected portions of the data more or less transparent, providing a way to see through the data and thus reveal complex 3D relationships in real-time. In volume rendering, every voxel of the volume is assigned: an emission color: the voxel emits light of a certain color and intensity. This color is characterized by its red, green and blue components (or channels). an opacity (opacity, also referred to as alpha, is the opposite of transparency.) The transparency of a voxel determines how much of the light from more distant voxels (along the same line of sight) passes through. The so-called transfer function determines how the original volume data (in the case of CT, representing X-ray attenuation) is mapped to emission and opacity. By adequately mapping to emission color, distinct features can be color-highlighted (in the case of CT, e.g. different material types). By tuning the opacity mapping, the degree to which more distant features shine through and thus contribute to the final rendering can be modified (in real time). Specific features can even be totally suppressed by mapping the corresponding data values to full transparency (= zero opacity). The concept of imaging mode is also determining for the appearance of the rendering. The supported imaging modes are: Surface This mode corresponds to the general emission-absorption model described above.
2 Maximum intensity projection For every ray hitting the screen, only the most opaque voxel along the ray is retained. Hence, this mode automatically highlights the structures of maximum intensity. Attenuation In this mode, the opacities for every voxel along a ray hitting the screen are integrated, mimicking the effect of a radiograph taken along the current viewing direction. Multi-volume rendering The technique of volume rendering can readily be extended to multiple volumes: every volume has its own transfer function, yielding an emission color and opacity per volume. These emission colors and opacities are then appropriately weighted to produce a combined emission color and combined opacity. A typical application for multi-volume rendering is multi-modality 3D imaging, in which distinct 3D imaging techniques (CT, MRI, SPECT/PET,...) provide multiple volumetric images (and typically complementary information) of a single sample. When working with multiple volumes, only the Surface imaging mode makes sense and is thus the only imaging mode available. Using the weight controls, the relative contribution of any volume to the rendering can be increased or diminished; for instance, a volume can temporarily be made invisible. Transfer function In volume rendering, every voxel in the volume is assigned an emission color (the color the voxel emits, determined by its red, green and blue components) as well as an opacity (opacity is the opposite of transparency.) Both of course depend on the original volume data and the mapping is governed by the so-called transfer function. The horizontal axis in the plot represents the original scalar data (the x-ray attenuation), the vertical axis represents one of the transfer function components (red, green, blue, luminance, opacity). Modifying the opacity controls the visibility of the corresponding voxels and how much they obscure more distant voxels. By setting the opacity for a given intensity range to zero (full transparency), the corresponding voxels are effectively made invisible. Two types of transfer functions exist: The color channels are linked into a single intensity (or luminance) channel, which modulates a user-specified base color. Only varying intensities of the specified base color or gray scales (if the base color is white) will appear in the image. The color channels vary independently (red, green and blue channels). Multiple colors can be introduced in the image and are typically used to highlight various elements of the volume data. The following table illustrates both types of transfer functions:
3 Channels Rendering luminance opacity red green blue opacity Installing CTvox To install CTvox on your Android device, go through the Google Play store, in the usual fashion (the app is free of charge.) Creating and transferring volume data Volume data for the CTvox app is stored in a VXM file. A VXM file contains both the volume data and the associated transfer function(s). VXM files are generated using the companion CTvox application for the Windows desktop, shown below. The desktop application can be downloaded free of charge from the Bruker microct website, here.
4 To generate a VXM file from a dataset, select Export as VXM Data... from the Actions menu. All currently visible volumes (up to four volumes) will be included in the exported dataset. The volume data is adequately resized and saved as a single VXM file. The transfer function(s) (one per volume), the scene's background color and the various labels are stored in the VXM file as well. For full details on creating VXM files, we refer to the desktop application's online help on the Export as VXM Data command. The easiest way to transfer a VXM file to your Android device is to download it wirelessly using the device itself. Any method will do: through the web browser, as an email attachment, using a cloud storage app such as Dropbox, Google Drive or OneDrive. Next, open the downloaded file: CTvox will launch and open the VXM file. From then on, the dataset is available for loading from CTvox's storage. A set of example datasets is available here. Keep in mind that all methods described here for transferring VXM files apply equally well to TF files, which represent transfer functions. The CTvox app supports saving and loading of transfer functions and uses the same file format as the desktop version of CTvox. Hence, transfer functions can readily be interchanged. Just as for a VXM file, downloading a TF file to your device and opening it with CTvox will first copy it to the app's local storage, then load it. From then on, it's available through the Load transfer function dialog. In the following sections, we ll first cover in more detail how to use Dropbox to transfer VXM files. You ll find that we have provided a tighter integration with Dropbox in the app, in order to make the exchange of files as easy as possible. We conclude with describing how to transfer files over a USB connection. VXM file transfer using Dropbox Dropbox is one of several free cloud storage and file synchronization services. Files can be uploaded to Dropbox's servers and then shared between any number of computers and mobile devices. As such, it's ideally suited to transfer VXM files generated on your Windows PC using CTvox to your device. Popular competitors offering a similar service include Google Drive and Microsoft's OneDrive.
5 Signing up for the service can be done through the Dropbox website, as part of the Windows installation or from within the various mobile apps. To create an account, you'll need to specify your first and last name and an email address as id. Visit the Dropbox website to download the Windows version of the software. Installing Dropbox on your PC creates a special Dropbox folder in the file system. Files placed in this folder will automatically be synchronized with the cloud storage and thus be accessible from any computer or device connected to internet that supports Dropbox. To install Dropbox on your Android device, go through the Google Play app store, in the usual fashion. When installation has completed, launch the Dropbox app and sign up or sign in, depending on whether you've already created your account. Then navigate to the desired VXM files in your Dropbox. The screenshot below shows a Dropbox subfolder containing VXM files.
6 Tap a VXM file to download it to the device. When downloading has completed, the file will automatically be opened: the dataset will be copied to CTvox s dedicated storage and the app will launch to open it. From then on, the dataset is available in the Open dataset view. It's also possible to directly access your Dropbox from within the CTvox app: when the Dropbox app is installed on your device, a button bearing the Dropbox logo will appear at the bottom of the Open dataset dialog, beneath the list of locally stored datasets. Tapping this button launches a file browser with which you can navigate your Dropbox (if you haven't signed up or signed in yet, you'll be offered to do so.) Tapping a VXM file will download, copy and open the dataset, as usual. VXM file transfer using a USB connection The most direct way to transfer a file from your PC to your Android device is over a USB cable. In particular, it allows you to quickly transfer multiple files at once. When connecting an Android device to a Windows PC, it will appear as a media device in the File Explorer. (This could take a while when connecting the device for the first time, as an automatic driver install might launch.) If your device doesn't appear, make sure that it is configured to connect using the so-called Media Transfer Protocol (MTP). The relevant setting will typically reside in a Storage section of your device's Settings and should look similar to this:
7 The CTvox app stores its files in the /Android/data/com.bruker_microct.android.ctvox/files folder on the device. Transferring files between the PC and the device is as easy as copying files to or from this folder. Mac users should use the MTP setting, too, and install the Android File Transfer utility for OS X. It can be downloaded from http://www.android.com/filetransfer. The utility allows you to browse the file system of the connected Android device. Files can be transferred by dragging them between the Android File Transfer window and a Finder window. Using CTvox Rendering view When launched, the app opens to an empty rendering view, waiting for a dataset to be opened.
8 The action bar at the top of the screen shows the various commands at your disposal. Its appearance may vary depending on your device: if the screen width is too small (as is often the case with handsets in portrait orientation), not all buttons will show. The remaining options can be summoned using the action bar's overflow button. Tapping the Open dataset button pops up a list of the datasets present in the app's storage.
9 Datasets can be deleted from the device: long press any of the entries to enter editing mode, select/unselect entries at your leasure, then tap the button to delete the highlighted datasets. Tapping the Done button will exit editing mode, without further action. Tap a listed dataset to open it. The following gestures are available to adjust the scene: Dragging with a single finger rotates the volume. Pinching moves the camera closer or further. Dragging with two fingers translates the volume. A long press followed by dragging moves the faces of the clipping box. By default, volume and clipping box will move as one. Setting Control to Clipping box in the Clipping options will cause the clipping box to move independently from the volume. A double tap in the rendering view will also switch control between volume and clipping box.
10 The remaining Clipping options include switching between clipping and cutting action for the clipping box and showing/hiding the clipping box. The Imaging mode specifies how light contributions from the various voxels are blended and thus determining for the final appearance of the rendering (cfr. background item on volume rendering.) Tapping the Reset scene button resets the scene (orientation and translation of both volume and clipping box, size of the clipping box) as well as the Clipping options and Imaging mode settings. The remainder of the settings are grouped under the Miscellaneous settings button. The background color for the rendering can be modified: tapping the color preview pops up a color picker to select the new color. Please note that loading a dataset changes the background color: when creating the VXM file using the desktop application, the then active background color is stored in the file; the mobile app will apply the stored background color when opening a dataset.
11 In the same vein, up to two text labels are included by the desktop application in the created VXM file. These labels can be used to augment the dataset with information such as a description, authoring information or copyright notice. The visibility of the labels can be toggled (unless the content protection feature was checked during export) and their size adjusted. The labels can be repositioned, too, simply by dragging them. If the loaded dataset doesn't contain any label, the Miscellaneous settings Background color button. The following table summarizes the controls for the rendering view. button simplifies to a Touch/gesture One finger drag Two finger drag Pinch Long press + drag Single tap Double tap Effect Rotation Translation Camera distance Move face clipping box Show transfer function editor Toggle volume/clipping box control Transfer function editor A single tap in the rendering view or tapping the button opens the transfer function editor: the transfer function is overlaid on the rendering view and available for editing. As the transfer function is modified, the rendering is updated in real time. A preview bar shows the resulting emission color. Single tapping outside the plot or pressing the Back button closes the transfer function editor and reverts to the rendering view. The leftmost dropdown in the toolbar selects the active channel.
12 Switching the active channel may switch the transfer function's type (cfr. background item on transfer functions.) When the transfer function's type is luminance-opacity, the color picker to set the transfer function's base color. button is visible: tapping it pops up a Use the following touches/gestures to edit the active curve: A single tap adds a marker or moves an existing one. Drag a marker to move it. Long press a marker to remove it. The curve model specifies the type of curve interpolating the markers for the active channel: a jagged polyline (useful to realize sharp transitions) or a smooth spline. The Reset button allows one to reset the active channel, all channels or revert to the original transfer function included with the dataset. Transfer functions can be saved and subsequently reloaded. The file format used is the same as for the desktop version (TF files), hence transfer functions can be exchanged. Use the button to invoke the Load and Save transfer function dialogs.
13 The TF file extension is registered with CTvox, which means that TF files, too, can be transferred to the app's dedicated storage by downloading them to the device and then opening them, either automatically or explicitly (cfr. Creating and transferring volume data.) From then on, they will show up in the Load transfer function dialog. Again, long pressing an existing transfer function will enter editing mode and allows you to selectively delete transfer functions. If Dropbox is installed on your device, a button bearing the familiar Dropbox logo will appear at the bottom of the Load transfer function dialog, beneath the list of locally stored transfer functions, as illustrated in the screenshot above. Tapping this button launches a file browser with which you can navigate your Dropbox (if you haven't signed up or signed in yet, you'll be offered to do so.) Tapping a TF file will download, copy and load the transfer function, as usual. Multiple volumes After opening a multi-volume dataset, the toolbar will show an additional button Multi-volume options. to invoke the
14 A legend to identify the various volumes can be displayed. These volume labels are inserted by the desktop application in the VXM file at the time of creation. Like the text labels discussed earlier, the size of the volume labels can be adjusted and the legend can be repositioned by dragging it. The relative contribution of the various volumes to the rendering can be adjusted interactively by enabling the volume weight controls: a set of sliders, one per volume, is overlaid on the rendering, allowing adjustment of the relative weights. The screenshot below shows the volume weight controls for a four-volume dataset. The controls can be repositioned by dragging the translucent pane. Tapping the Reset weights button will restore the volume weights to their initial values. The following screenshot showcases an application of multi-volume datasets. The VXM dataset consists of two volumes: a structural micro-ct scan of a core sample (a cylindrical rock section) and the matching pore thickness information, obtained through post-processing of the micro-ct data. The rock structure has been given a clay-like appearance and is augmented with the color-coded pore thickness information. The legend, weight control and labels are all visible.
15 The transfer function editor, too, looks slightly different for a multi-volume dataset: since every volume has its own transfer function, a volume selector appears leftmost in the toolbar, to allow switching between the various transfer functions. The Reset menu has some additional options: Restore all initial TF This will reset every volume's transfer function to its initial state, rather than just the one currently selected. Apply TF to all volumes This option will apply the currently selected transfer function to the remaining volumes, i.e. all volumes will have identical transfer functions.