Spectral ROOSTER¶

This page describes an application for two-step spectral CT reconstruction. Please start by reading the general documentation on spectral CT.

Once measured projections have been decomposed into material projections, any reconstruction algorithm can be used to reconstruct each material. In RTK, simply splitting the material projections file (saved as an itkVectorImage) into one set of projections per material, and then using rtkfdk, rtksart or rtkconjugategradient will work.

RTK provides a command line application to jointly reconstruct all materials at once, allowing to apply spatial regularization in each material, but also regularization along the material dimension, as reconstructed material volumes sometimes share the same spatial structure. Since rtkspectralrooster uses the ROOSTER filter, originally designed to reconstruct 3D+time volume sequences, the material dimension is referred to as time in the command-line help and parameter names.

Dataset¶

The data used in this documentation page can be downloaded using Girder. It is a simulation through a cylinder of water with two inserts, one empty, the other filled with cortical bone.

Command line application¶

# Reconstruct a set of material volumes from all material projections,
# applying Total Nuclear Variation regularization

rtkspectralrooster \
  -o cl_spectralrooster.mha \
  -i zero_recon.mha \
  -p decomposed.mha \
  -g geometry.xml \
  --niter 4 \
  --cgiter 2 \
  --tviter 2 \
  --gamma_tnv 1

cl_spectralrooster.mha should look similar to recon_ref.mha available on Girder.

To speed things up, it is recommended to use the CUDA version of the forward and back projectors, and by using CUDA in the conjugate gradient descent algorithm, by running this command instead:

# Reconstruct a set of material volumes from all material projections,
# applying Total Nuclear Variation regularization, using CUDA accelerations

rtkspectralrooster \
  -o cl_spectralrooster.mha \
  -i zero_recon.mha \
  -p decomposed.mha \
  -g geometry.xml \
  --niter 4 \
  --cgiter 2 \
  --tviter 2 \
  --gamma_tnv 1 \
  --cudacg \
  --fp CudaRayCast \
  --bp CudaVoxelBased

Command line options¶

usage: __main__.py [-h] [-V] [-v] --geometry GEOMETRY --output OUTPUT
                     [--niter NITER] [--cgiter CGITER] [--cudacg]
                     [--input INPUT] --projection PROJECTION [--nodisplaced]
                     [--nopositivity] [--tviter TVITER]
                     [--gamma_space GAMMA_SPACE] [--threshold THRESHOLD]
                     [--order ORDER] [--levels LEVELS]
                     [--gamma_time GAMMA_TIME] [--lambda_time LAMBDA_TIME]
                     [--l0iter L0ITER] [--gamma_tnv GAMMA_TNV]
                     [--origin ORIGIN [ORIGIN ...]] [--size SIZE [SIZE ...]]
                     [--dimension DIMENSION [DIMENSION ...]]
                     [--spacing SPACING [SPACING ...]]
                     [--direction DIRECTION [DIRECTION ...]] [--like LIKE]
                     [--fp {Joseph,CudaRayCast,JosephAttenuated,Zeng,CudaZeng}]
                     [--bp {VoxelBasedBackProjection,Joseph,CudaVoxelBased,CudaRayCast,JosephAttenuated,Zeng,CudaZeng}]
                     [--step STEP] [--attenuationmap ATTENUATIONMAP]
                     [--sigmazero SIGMAZERO] [--alphapsf ALPHAPSF]
                     [--inferiorclipimage INFERIORCLIPIMAGE]
                     [--superiorclipimage SUPERIORCLIPIMAGE]

Named Arguments¶

-V, --version

show program’s version number and exit

-v, --verbose

Verbose execution

Default: False

--geometry, -g

XML geometry file name

--output, -o

Output file name

--niter, -n

Number of main loop iterations

Default: 5

--cgiter

Number of conjugate gradient nested iterations

Default: 4

--cudacg

Perform conjugate gradient calculations on GPU

Default: False

--input, -i

Input volume

--projection, -p

Vector projections file

--nodisplaced

Disable the displaced detector filter

Default: False

--nopositivity

Do not enforce positivity

Default: False

--tviter

Total variation (spatial, temporal and nuclear) regularization: number of iterations

Default: 10

--gamma_space

Total variation spatial regularization parameter. The larger, the smoother

--threshold

Daubechies wavelets spatial regularization: soft threshold

--order

Daubechies wavelets spatial regularization: order of the wavelets

Default: 5

--levels

Daubechies wavelets spatial regularization: number of decomposition levels

Default: 3

--gamma_time

Total variation temporal regularization parameter. The larger, the smoother

--lambda_time

Temporal gradient’s L0 norm regularization parameter. The larger, the stronger

--l0iter

Temporal gradient’s L0 norm regularization: number of iterations

Default: 5

--gamma_tnv

Total nuclear variation regularization parameter. The larger, the smoother

Output 3D image properties¶

--origin

Origin (default=centered)

--size

Size

Default: [256]

--dimension

Dimension (Deprecated) Use –size instead.

--spacing

Spacing

Default: [1]

--direction

Direction

--like

Copy information from this image (origin, size, spacing, direction)

Projectors¶

--fp, -f

Possible choices: Joseph, CudaRayCast, JosephAttenuated, Zeng, CudaZeng

Forward projection method

Default: 'Joseph'

--bp, -b

Possible choices: VoxelBasedBackProjection, Joseph, CudaVoxelBased, CudaRayCast, JosephAttenuated, Zeng, CudaZeng

Back projection method

Default: 'VoxelBasedBackProjection'

--step

Step size along ray (for CudaRayCast only, default to the minimum voxel spacing of the input volume if set to 0)

Default: 0.0

--attenuationmap

Attenuation map relative to the volume to perform the attenuation correction (JosephAttenuated, Zeng and CudaZeng)

--sigmazero

PSF value at a distance of 0 meter of the detector (Zeng and CudaZeng only)

--alphapsf

Slope of the PSF against the detector distance (Zeng and CudaZeng only)

--inferiorclipimage

Inferior clip of the ray for each pixel of the projections (Joseph only)

--superiorclipimage

Superior clip of the ray for each pixel of the projections (Joseph only)