The number of materials in the object to be reconstructed and their attenuation values should be known beforehand, given by the function $\mu$. The algorithm consists of several phases, which are indicated in the flow-chart in Figure \[fig:FlowChartDART\]. The pseudocode of DART is given in Algorithm \[Alg:Dart\].

![Flow chart of the DART algorithm. The DART iteration activities are indicated in red and the initialization and post-segmentation activities are indicated in blue.[]{data-label="fig:FlowChartDART"}](figure5.eps){width="100.00000%"}

**[Input]{}: $\vec{W}$, $\vec{p}$, $\mathcal{R}$ $\vec{x}^0 \gets\ \text{Mask-ARM}(\vec{W}, \vec{p}, \bf{1}_n, \bf{0}_n)$ $\vec{y}^k \gets \ \text{Seg}(\vec{x}^k, \mathcal{R})$ $\vec{M}^k \gets \ \text{Mask}(\vec{y}^p)$ $\vec{x}^k \gets \ \text{Mask-ARM}(\vec{W}, \vec{p}, \vec{M}^k, \vec{x}^{k-1})$ $\textbf{Output:}\ \vec{x}^K, \text{Seg}(\vec{x}^K, \mathcal{R})$**

### Initialization

In the initialization phase, given the projection data $\vec{p}$ and the projection properties by means of $\vec{W}$, an initial reconstruction $\vec{x}^0$ is calculated using an Algebraic Reconstruction Method of choice (hereafter referred to as the ARM), for example ART, SART or SIRT [@KakSlaney]. With the initial reconstruction $\vec{x}^0$ at hand, the main loop of the DART algorithm begins.\

### Segmentation

In this main loop, in iteration $k$ the image $\vec{x}^{k-1}$ is segmented using a simple thresholding scheme, forming the image $\vec{y}^k \in \mathcal{R}^n$, by computing for every voxel $j$ the closest material attenuation value: $$\begin{aligned}
\vec{y}_j^k &= 