NEW ‐ Quick Start Guide (under construction) - xcist/documentation GitHub Wiki

Usage Overview

XCIST is a Python application (the compute-intensive work are written in C/C++) that runs on Linux, Windows, and MacOS. To perform a simulation, users can simply run the executable or install CatSim in their Python environment.

How to install CatSim

How to run a simulation

The gecatsim/examples directory contains several sample programs that you can experiment with. You can utilize these scripts as a starting point for your experiments, taking advantage of predefined elements and structures.
You can run a testing simulation with:

python Sim_Recon_Sample.py

Then, using either our GUI or simple configuration files, you will simply need to

  1. Select an imaging system configuration from a pre-defined standard system with or without variations based on several available component models (or advanced users can develop their own models).
  2. Select a scan protocol from several pre-defined protocols and multiple user-selectable variations such as kVp, mA, rotation time, focal spot, bowtie, etc.
  3. Select simulation options from several pre-defined configurations and multiple user-selectable variations including oversampling, with or without quantum and/or electronic noise, etc.
  4. Select a subject to be scanned (i.e a numerical phantom) from a rich library of geometric phantoms and virtual patient models with and without tumors (or advanced users can develop their own phantoms).
  5. Select a reconstruction algorithm from several pre-defined options (or advanced users can develop their own reconstruction).
  6. Launch your simulation.
  7. Review the results! (available as simple binary files and/or in DICOM format)

The code repository is here.

Simulation modes & output

A typical CatSim simulation model is given by:

where:

  • yi is the detector signal at sinogram index i,
  • k is the energy index, s is the beam sub-sampling index,
  • Aik is the number of photons arriving at the detector without attenuator for energy bin k,
  • Iiso is the intersection length between the line with index is and the object with index o,
  • μok is the linear attenuation coefficient of object o at energy k,
  • yikscatter is the scatter signal, for example computed by the Monte Carlo simulation,
  • DQE is the detector quantum efficiency (fraction of photons absorbed),
  • fCONV is a factor to convert from keV to the number of electrons, and
  • σelectronic is the standard deviation of the electronic noise.

Performing all of these requires many different models, applied at different steps in the simulation process. Here we summarize the most commonly-used simulation modes and the output files they produce.

CatSim was originally developed to produce sinograms to be used in the process of developing new reconstruction algorithms. Therefore, the focus is on simulation, rather than reconstruction. However, CatSim is also used by non-reconstruction experts, for producing reconstructed images following simulation. Therefore, some basic “prep” and reconstruction functionality is included with CatSim.

In general, these can be invoked after running catsim, and the same configuration file can be used for prep and reconstruction as was used for the simulation itself, provided that the fields required by catprep and catsimrecon are specified in the configuration file.

All results of CatSim and related commands are written to files for which the base name is specified in the cfg structure:

cfg.results_basename = 'Basename';

Basename can (optionally) include a full path. If a Basename is provided without a full path, then the Basename will be interpreted relative to the current Matlab working directory.

CatSim will automatically add an extension to complete the file name:

.scan	regular scan, without prep
.offset	offset scan
.air	air scan
.prep	prepped scan
.recon	reconstructed image or volume

Simulation results explained

The output/results of CatSim are binary data in float32.
cfg.resultsName defines the basename of the result files, which can be full path and name or just the name.
The result files are:

    [basename].air - air scan data, dim: [Ebin, column, row, view_air]
    [basename].offset - offset scan data (X-ray off), dim: [Ebin, column, row, view_offset]
    [basename].scan - phantom scan data, dim: [Ebin, column, row, view]
    [basename].prep - prep data, dim: [Ebin, column, row, view]
    [basename]_512x512x4.raw - reconstructed image, dim: [recon.imageSize, recon.imageSize, recon.sliceCount], here is 512x512x4

where

    Ebin is the energy bin, for energy integration CT, it's 1.
    Column and row are detector pixels in x and z direction.
    View is the scan views, view_air and view_offset are 1 by default.

Back to Main menu

⚠️ **GitHub.com Fallback** ⚠️