Perelman School of Medicine at the University of Pennsylvania

Section for Biomedical Image Analysis (SBIA)

Brain Tumor Viewer (BTV)

BrainTumorViewer (BTV) is a lightweight viewer, built for fast and simple interaction with MRI image volumes.

BTV is primarily designed for visualizing multi-modal MRI brain volumes and initializing seed-points for the following software packages:

i) GLioma Image SegmenTation and Registration (GLISTR)ii) Pre-Operative and post-Recurrence brain Tumor Registration (PORTR)

After initializing these seed-points, a user can generate execution scripts through BTV's graphical user interface for various platforms and custom input parameters.

BrainTumorViewer has been superceded by our Cancer and Phenomics Toolkit (CaPTk).


Note: BTV always assumes that the loaded multi-modal MRI scans are co-registered and in the LPS coordinate system.

In order to show how to use BTV, we use an example of initializing seed-points for GLISTR, in order to segment a brain tumor.

Firstly, we run BTV and load all co-registered images using 'File -> Open Image(s)' menu, or by dragging and dropping them from your file browser into the software.

Figure 1 (below), shows an example screenshot of the images panel (a) after loading four MRI images, i.e. T1, T1-Gad, T2, and T2 FLAIR. (b) describes a list of the filenames of the loaded images. Users can select which image is shown in the visualization windows (g), (h), and (i) by selecting an image from the list. Users can unload individual images by clicking the "X" button on the left of each image filename, or unload all of them by clicking the "Clear all" button (c), at the bottom of the list. Panel (e) shows a duplication of the list of the loaded filenames for overlay purposes. The "Overlay" tickbox (d) allows for observation of intensity changes from one image to another using a slider. Once this tickbox is enabled, the user must select one image from the top list (b) and another image from the bottom list (e) of images, which will correspond to the images on the left and the right side of the slider (d), respectively. The weight of overlay between the two images is controlled by the slider. The "Preset" (f) and the rest of the controls in the bottom left side of the panel, change the color mapping of the visualization windows, in order to depict different properties of the displayed images. The visualization windows (g), (h), and (i) show the axial, coronal, and sagittal views of the selected image, respectively. Finally, more detailed image information are shown in (j), (k), and (l).

Figure 1: The 'Images' panel of BTV


Figure 2 and 3 (below), shows a screenshot of the "Seed-Points" panel. Users must first select the software that the output files will be used with in the "TARGET APPLICATION" (m). The currently available options include 'GLISTR', as well as 'PORTR Pre' and 'PORTR Post', for the pre-operative and the post-recurrence scans used in PORTR.

The users then need to choose the type of points to initialise in the "INITIALIZATION TYPE" (n). The "Tumor points" are used to initialize seed-points shown in list (o) that approximate the bulk volume of each apparent tumor by a sphere. These points refer to a seed point for a tumor center and another point to define the radius of the sphere. To initialize a tumor center, user should first click on the "Tumor point" in the "Initialization Type" (n) and then click (i.e., move crosshair) to an approximate center of each tumor mass and push < shift > + < spacebar >. To update a tumor center, a user can select one of the tumors listed in (o), then click on the new position within any of the visualization windows and press < spacebar >. To add/update the radius for a tumor shown in (o), click on the approximate boundary of the tumor within any of the visualization windows and press < ctrl > + < spacebar >. The "Tissue points" are used to model the intensity distribution of each brain tissue type, e.g. white matter (WM), grey matter (GM), cerebellum (CB). All the initialized tissue points are shown in list (q). To add a new point in this list, the user must first select a specific tissue type from the radio buttons (p) above the list, click one sample location of that tissue within the visualization windows and press either < shift > + < spacebar >, or < ctrl > + < spacebar >. To update a location of a tissue seed-point, the user can select (double-click) the point in the list (r), click on the new location within the visualization window and press < spacebar >.

After completing initializing seed-points for each "Initialization Type", the list of the points can be saved using the 'Save' button. Note that pre-specified filenames are suggested depending on the selected target application. To erase individual points users have to select (double-click) a point from (j), or (l), and use the "Remove" button. Otherwise they can erase all of the seed-points by clicking the "Clear all" button in the corresponding list. Finally, if seed-points have been initialized in the past for a particular subject, the users can load them using the "Load" button.\

Figure 2: The 'Seed-Points' panel of BTV (Tumor Points)


Figure 3: The 'Seed-Points' panel of BTV (Tissue Points)

After the initializations are complete, the users can create a submission script automatically in the "CREATE JOB" section (r), for the selected target application, using the button corresponding to the platform the user will use to submit their job (i.e. SGE, Linux, Windows).

Figure 4: The job dialog for creating a GLISTR job


Figure 4 (above), shows a job dialog when SGE is selected in (r). In (s), users specify the basic parameters for making a submission script for GLISTR. In (t), additional information is specified to submit a job directly to the SGE. (u) is used for creating a tumor infiltration map (optional). Specifically, for creating a GLISTR SGE script, users could specify a command for loading module (e.g. 'module load glistr') in 'GLISTR Path', 'Simulator Dir', and 'HOPSPACK Dir' instead of specifying path names. In Linux or Windows, input 'GLISTR' (without its path) in 'GLISTR Path' when 'GLISTR' could be found in the path as 'bin' directory of GLISTR is included in the path variable. Also, do not specify 'Simulator Dir' and 'HOPSPACK Dir' if both programs could be found in the path. In 'Atlas Dir', users could specify the last directory name only. In this case, the relative path from 'GLISTR' executable is automatically prepended.

The following table describes the details of each element.

Name Explanation
GLISTR Path Path of GLISTR executable
Atlas Dir Directory for the statistical atlas of the normal population (select one from the installation directory)
Data Dir Directory containing image data (it automatically fills image names if available)
Image Name (T1, T1CE, T2, Flair) File names for each modality
Image List Name File name for the image list (default name is preferred)
Seed Points Name File name for the seed points (default name is preferred)
Tissue Points Name File name for the tissue points (default name is preferred)
Output Dir Directory for saving results
Working Dir Directory for saving temporary files (if Use is unchecked, temporary files are deleted)
Option String Additional parameters can be specified here
Simulator Dir Directory containing the tumor simulator
HOPSPACK Dir Directory containing the HOPSPACK executable
Thread Number The number of threads for GLISTR
Mapping Dir From / To The strings matched with "From" in the directories are converted to "To" in the job file (only for SGE and Linux)
RAM Specify the required RAM in GB (only for SGE)
E-mail Specify the email address for receiving the job information (only for SGE)
Job File Path Path for saving a job file
PuTTY Dir Directory containing PuTTY executable (only for SGE)
Option Command Optional commands required to run before submitting a job (only for SGE)
Host Name, ID, Password Information for the server connection (only for SGE)
Predict Path, Matrix Name, Data Dir (optional) Parameters for the Predict program

 Figure 5 (below), shows a job dialog when 'PORTR Pre' or 'PORTR Post' is selected in (i) and 'SGE' is selected in (r). Before creating a job file, users need to complete initializing seed-points for both the pre-operative and the post-recurrence scans. In (v), users specify the basic parameters for making a submission script for PORTR. The meaning of each row is analogous to (s), except now users need to specify both the details for the pre-operative and the post-recurrence data. The description of (w) is same to (t).

Figure 5: The job dialog for PORTR


To segment abnormal regions using the adaptive geodesic transform, select 'Geodesic' in (m). Then initialize appropriately some tumor seed points with their corresponding radius in (o), as described above, and then press the 'Execute' button.

The following table describes the controls for keyboard and mouse.

Mode Description
Viewing Use 1-4: Change view among loaded images
  h: Display/Hide crosshair and seeded points
  r: Reset "Geometrical Adjustments"
  a: Reset "Intensity Adjustments"
Drawing Mode f: Enable/Disable foreground drawing
  b: Enable/Disable background drawing
  e: Enable/Disable erase mode
  1-9: Change brush size
  Esc: Quit drawing mode
Tumor Point Initialization Shift + spacebar: Set the tumor center
  Ctrl + spacebar: Update the tumor radius
  spacebar: Update the tumor center location
Tissue Point Initialization Shift + spacebar: Set a new point for a specified tissue
  Ctrl + spacebar: Set a new point for a specified tissue
  spacebar: Update the location of a specified tissue point


Mode Description
<U/D>: Up/Down Wheel Scrolling, <LB>: Left Button, <RB>: Right Button
Viewing Use <U/D>: Change slice number
  <LB> + <movement>: Move crosshair
Geometrical Adjustments Ctrl + <U/D>: Zoom in/out (Adjust scaling factor)
  Ctrl + <LB> + <movement>: Pan images (Adjust image's center)
Intensity Adjustments <RB> + <vertical movement>="">: Brightness adjustments
  <RB> + <horizontal movement>="">: Contrast adjustment



Version 2.0.0 (Nov 4, 2015)
  • Initialization of a seed-point cannot happen on the same coordinates.
  • Selection among different tissue types via radio buttons.
  • Improved navigation of the tissue and tumor point lists.
    • Removal of single seed-point in tissue point list triggers selection of next point in line.
    • Arrows and Enter select points in tissue points list.
    • Delete all the drawn tissue points by pressing clear all button.
    • Clicking a point on image highlights the corresponding entry in the tissue point list, for allocation/deletion.
    • "Clear all" option added.
    • Enabling selection of multiple points.
    • Add the functionality of the "Enter" and "Delete" keyboard buttons.
    • Improved visualization of points.
  • Visualization of the maximum and the minimum intensity of the image.
  • Intuitive naming convention of buttons (e.g. from "Seed point" to "Tumor point", as even the tissue points are seed points).
  • Include the AX, SA, CO within the visualization windows and on top of the coordinates' table for the axial, sagittal and coronal views, respectvely.
  • Refined Documentation.
  • Counting record of initialized Tissue points in the bottom right part of software.
  • Error Handling (Bugfixes).
    • Under "Seed-Points" tab: exception occurs if no image is loaded and double-click is done on a blank entry.
    • Shift + space on any image crashes the program.
Version 1.0.0 (Dec 2, 2014)
  • First public release of BTV.



Software Authors:



Please cite the following publications when you use BrainTumorViewer in your research:
  • S.Bakas, K.Zeng, A.Sotiras, S.Rathore, H.Akbari, B.Gaonkar, M.Rozycki, S.Pati, C.Davatzikos, "Segmentation of Gliomas in Multimodal Magnetic Resonance Imaging Volumes Based on a Hybrid Generative-Discriminative Framework", In Proceedings of the Multimodal Brain Tumor Image Segmentation Challenge held in conjunction with the Medical Image Computing and Computer-Assisted Intervention 2015 (MICCAI-BRATS 2015), Technische Universitaet Muenchen (T.U.M.), Munich, Germany, 5-9 Oct. 2015
  • D.Kwon, R.T.Shinohara, H.Akbari, C.Davatzikos, "Combining Generative Models for Multifocal Glioma Segmentation and Registration", In Proceedings of the Medical Image Computing and Computer-Assisted Intervention (MICCAI), Lecture Notes in Computer Science, Vol.8673, 763-770, 2014