Image processing

Anatomical 3D imaging of the brain and head can be extremely useful for planning various types of surgical interventions. The tools described below harness the power of 3D Slicer via Python scripting, to streamline certain processes that facilitate surgical planning.

Imaging data acquisition

Stereotaxes

Although the Horsley-Clarke stereotaxic frame was invented over a century ago, it continues to be the primary method of stabilizing and orienting the head of anesthetized animals during surgical procedures, as well as defining a 3-dimensional Cartesian coordinate frame. The basic design utilizes four points of contact with bony anatomical landmarks of the skull that are structurally capable of supporting the head, to define a horizontal plane known as the ‘Frankfurt plane’. These points are the external auditory meatus (or ear canal) and the infraorbital margin (bilaterally). Additionally, a palette bar applies upward pressure on the palatine process of maxilla, in order to push the infraorbital margins up into the stereotax orbit bars. Thus, the ear bars define the stereotaxic coordinate system’s origin in the medial-lateral (X), anterior-positerior (Y), and superior-inferior (Z) dimensions, while the horizontal Frankfurt plane defines the head’s orientation about the medial-lateral axis.

Modern commercial producers of MR-compatible stereotaxic frames suitable for large animals include Kopf Instruments 1430M, Crist Instruments, Jerry-Rig, and RWD 68915.

Data import module for NIF_Import users
_images/NIF_Import_Module.png

A Slicer module named NIF_Import is provided specifically for researchers at NIH who use the Neurophysiology Imaging Facility (NIF) Core to acquire their imaging data. It requires the user’s computer to be connected to the NIH network, and to have the NIFVAULT network storage volume mounted. Users on the NIH network can access information on how to do this via the NIF’s intranet documentation site.

To use the NIF_Import module, type a subject’s name or ID in the Subject name / ID field. The module will then search NIFVAULT’s DICOM directories for MRI and CT data folders that contain matching strings, and list the session dates of any data it finds in the MRI session and CT session fields below. The user should select a single session for each modality and the module will then locate appropriate volumes within each session folder, to load into the viewer via SLicer’s DICOM module.

Optionally, the following processes can be applied after importing the selected volumes:

  • Apply de-sphinx rotation? - This is checked by default, and should always be used for raw DICOM data coming from the NIF’s Siemens Prisma 3T MRI scanner.

  • Initialize stereotax control points? - Checking this box will generate an initial set of control points within Slicer’s Markups module, which can be manually positioned to define the Frankfurt plane of stereotaxic coordinate system (see below).

  • Export skull surface? - Checking this box will generate an initial segmentation using Slicer’s Segmentations of the selected CT volume that aims to separate bone from air and tissue.

Aligning MRI volumes to stereotaxic space

1. Localize the stereotaxic frame in MRI

The header information in a raw, unprocessed MRI volume (e.g. DICOM or NIFTI file) will contain an ‘origin’ field, that is based on the geometry of the scanner and the field-of-view that was defined at the console during acquisition. Consequently, the raw data may have an arbitrary relationship to the anatomically-defined stereotaxic origin. The first step in processing the anatomical data is therefore to locate the steteotaxic origin and the Frankfurt plane, and update the volume to match this using an affine transformation.

The script AlignStereotaxic.py begins this process by automatically generating a set of four ‘control points’ (fiducials) in Slicer’s Markups module. The user can then click and drag these control points to their respective targets, as shown below. Once the control points are set, the script calculates the transform (translation and rotation) requried to bring the 3D volume

2. Calculate and apply transform

Cross-modal volume alignment

Creating a skull model

3D rendered skull

Implanted neural hardware typically involves an anchor point on the skull surface, even if the parts in contact with the brain are ‘floating’. There are several advantages to generating a skull model for each individual subjects including customization of implant hardware to specific skull surface contours.

Segmenting skull from MRI?

Why use CT rather than MRI?

Magnetic resonance imaging MRI and Computed tomography CT volumes contain very different tissue contrasts, as shown in the example coronal slice images below. CT has relatively low contrast for different tissue types but has excellent contrast between bone and soft tissue. Bone in a T1-weighted MRI on the other hand has a range of intensities that overlap with that of air, which makes it more difficult to segment via thresholding. Additionally, CT scans tend to be higher resolution. In the images below, the MRI has 0.5mm isotropic voxels and took ~30 minutes to acquire, while the CT has 0.2mm isotropic voxels and took ~1 minute to acquire. It is therefore recommended to acquire a CT of the subject when possible (in addition to anatomical MRIs), for use in skull reconstruction process. If for some reason you needed to reconstruct a skull from MRI data, it is still possible but requires more manual intervention and the end result will be less accurate than with CT. The interactive 3D models embedded below demonstrate this difference.

MRI

CT

The video below demonstrates how to segment a skull surface from a T1-weighted MRI using 3D Slicer. Note that this process requires the SurfaceWrapSolidify extension, which can be easily installed via the Extensions Manager wizard.

Post-surgical Grid Localization Scans