The CSF segmentation consists of two stages: fitting a partial volume model to the histogram of the grey-levels in the image volume under analysis, and production of a volumetric map of the CSF in the images. The separation of the model fitting from the actual segmentation allows the models to be checked, and any fit failures corrected.
CSF segmentation is performed by optimising a model describing the pure tissue and partial volume contributions present in the images under analysis. The initial model must be prepared prior to segmentation, and its location specified in the DODECANTS tool interface. Instructions on how to prepare these models is given in the TINA User's Guide, in the chapter describing the segmentation algorithm. The model consists of parameters such as the number of pure tissues present in the images, their mean grey levels and standard deviations, and a-priori probabilities describing their frequency of occurrence in the images, and so each MR image type requires a different model. However, the parameters are stored in plain ASCII text files, allowing the initial model for the optimisation to be written manually, and some sample initial models are provided on the TINA website at
For example, the following initial model file was designed for use on T1 IRTSE images, and contains descriptions of three tissues (white matter, grey matter and CSF):
3 1 0.0000000000000000000001 -1800 1.0 -650 1.0 -120 1.0 0.0067 0.0143 0.0167 200 600 0 600 3500 2000 0 2000 3500 CSF GM WM
The first line lists the number of tissues included in the model (3), the number of images to be segmented (1) and the threshold used to reject outlier pixels (small). The ``number of images to be segmented" parameter allows multi-dimensional data to be used i.e. more than one MR image type of the same region. However, the DODECANTS tool assumes that only one image volume is available. The next three lines list the mean grey levels of the tissues in the model and the priors used to represent their frequency of occurrence in the images under analysis. The following three lines are the diagonal elements of the inverse covariance matrix (i.e. the inverse variances of the model components). The next three lines are a matrix describing the frequency of occurrence of partial volume voxels: zeros in the matrix imply that the two tissues have no common boundaries. The final line lists labels for each of the tissues in the model. See the chapter of the TINA User's Guide describing the segmentation algorithm for more details.
The DODECANTS tool assumes that only a single MR image volume is available for each subject under analysis, since this is the most common scenario in practice. It applies the TINA segmentation routine by concatenating the sequence into a single image, and applying the segmentation routine to both the image grey levels and the gradients, using the procedure described in TINA Memo no. 2005-013. It had been found empirically, particularly in young subjects with small CSF volumes, that the CSF peak in the image histogram can be obscured by partial volume contributions from voxels containing mixtures of CSF and other tissues. Therefore, the tool includes functionality to select sub-regions of the image volume containing large amounts of CSF, thus enhancing the CSF peak in the image histogram. This consists of selecting two rectangular sub regions from the images, and fitting only the data in those regions. This procedure has the additional benefits that less data is used in the segmentation, reducing the processor time required, and the selected region includes only grey matter, white matter and CSF, so only a three tissue model is required. However, this model must still be written to correspond to the MR image type being used.
The coordinates of these regions can be accessed by pressing the ``Params" button in the EM Segmentation section of the tool. The parameters have been set up to select regions around the anterior and posterior limits of the ventricles, where the largest concentrations of CSF are found. Users may wish to experiment with these parameters. In order to display the selected regions, enter the pathname of the standard brain image volume into the ``Image file" field of the Sequence tool, enter the number of slices (49) into the ``End" field, and select ``ANLZ" on the ``File:" choice list. Then press ``Load" to load the standard brain volume, which will be displayed in the Sequence tool Tv. Next, start the ``Params" dialog box of the Coreg tool and enter -2500 into the ``threshold" field. This will ensure that all voxels are displayed. Enter the mid-point of the standard brain sequence (128.0, 128.0, 24.5) into the ``Center x", ``y", and ``z" fields of the Coreg tool, then press ``zoom" and ``anaglyph". The standard brain image will then be displayed in the three Coreg tool Tv's. Finally, press the ``Display Box" button in the DODECANTS tool, followed by ``init" in any of the three Coreg Tv's, to display the regions selected through the segmentation parameters dialog box. In order to clear the Coreg displays, press ``Del Seq" in the Sequence tool, followed by ``Image" in the Coreg tool. The parameters of the segmentation region selection can then be manipulated, and the above procedure repeated to display the altered regions.
The limitations of image display in TINA dictate that the images prepared by the ``Display box" procedure are padded with zeros to keep their dimensions consistent with those of the original sequence. This produces a large peak at zero in the histogram, and so will affect the model fitting stage of the segmentation. Therefore, an alternative procedure must be applied to display the histogram of the selected region and to set up the initial model. Prepare a data list with only one data set listed, and enter the location into the DODECANTS tool as usual. Then press the ``Image prep" button. This will prepare a set of non-padded sub-images in the Sequence tool. Press the ``Seqone" button in the DODECANTS tool to concatenate these into a single image. Press the ``push" button to copy this image to the Imcalc stack, and press ``init" in the Imcalc TV to display the image. A histogram can then be produced by selecting ``hist" in the ``Imcalc mice" choice list, then clicking and dragging in the Imcalc TV. The histogram of the selected region will be displayed in the Imcalc graph Tv. This will allow parameters such as the mean grey levels of each tissue to be determined. Then a rough guess at the initial model can be generated, based on the example given above. In order to display the result, press the ``NMR Segment" button in the top-level tinaTool window to launch the segmentation tool. Then enter the pathname of the model file into the ``Model File" field, and press input. Finally, press ``1D hist" in the NMR Segment tool to display the model components, overlaid on the image histogram, in the Imcalc Graph Tv. The initial model can then be refined and redisplayed manually, until a satisfactory initial model is generated. In addition, pressing the ``hfit scale" button in the NMR Segment tool will scale the model parameters to improve the fit to the histogram. Combinations of these operations should be used to produce a satisfactory initial model. Once this has been done, enter the desired pathname for the finalised initial model into the ``Model file" field of the NMR Segment tool and press ``Output" to save it to disk.
In order to run the segmentation stage of the algorithm, start a tinaTool as described above, and enter the directory and filename of the data list into the relevant fields. Then enter the filename of the initial tissue model into the ``initial model" field. The tool assumes that the initial model will be in the same directory as the data list. Enter any required parameters into the segmentation parameters dialog box. Start the model optimisation stage by pressing the ``EM: model" button. The tool will then run through each data set in the list, fitting the initial model to the data, and output the optimised models to text files in the same directories as the data sets. For example, if the data set is called alice.img, the optimised model will be called result alice_EM_model.
In order to facilitate the identification of any model fitting failures, the ``Model output" button will run through a data list, writing out the means and standard deviations of the pure tissue components of the models to a single text file, using the name given in the ``Output files" field of the DODECANTS tool. What to do about failed models is up to the user: for example, segmentation could be repeated using a different definition of the regions, or a different initial model, or a mean of all of the successfully fitted models could be produced and substituted for the failed models.
Once the optimised models have been checked, press the ``EM: seg" button to run through the data list, picking up the optimised models, and segmenting the CSF. The algorithm assumes that the binary masks required for detection of the eyes and sinuses from the CSF maps will be contained in an ANALYZE file, located in the same directory as the standard brain image volume, with the filename name_bincut where name is the filename of the standard brain image volume. The CSF maps will be multiplied with these masks, and output as ANALYZE files alongside the original data sets. For example, if the original data set is called alice.img, the masked CSF maps will be called alice_masked_EM.img. These images can be loaded into the Sequence tool for visual inspection: see the chapter of the TINA User's Guide on the Sequence tool for further information.