# Math

In QualityBox, we use Extension:SimpleMathJax which does rendering client-side instead of the more complicated server-side Math extension.[1] Both extensions use MathJax, and the server-side option would be more suitable in high volume environments.

Compare:

SimpleMathJax provides MediaWiki with MathJax

Other Example Renderings

## na-mic

For the nonrigid deformation model, we define a combined transformation consisting of a global and a local component

$T(\mathbf{x}) = T_{local}({T_{global}(\mathbf{x})})$

where $T_{global}$ is a twelve parameter affine transform and $T_{local}$ is a deformation model based on B-splines.

The free form deformation can be written as the 3-D tensor product of 1-D cubic B-splines.

$T_{local}(\mathbf{x}) = \mathbf{x} + \sum_{l=0}^3\sum_{m=0}^3\sum_{n=0}^3 B_l(u)B_m(v)B_n(w) \Phi_{i+l,j+m,k+n}$

where $B_l$ is $l$'th cubic B-spline basis function. $(u,v,w)$ is the distance to $(x,y,z)$ from the control point $\Phi_{i,j,k}$ as shown in Figure 2.

The deformation of a given point can be found using only the control points in the neighborhood of the given point. Therefore, optimization of the objective function can be implemented efficiently.

## slicer.org

example from https://www.slicer.org/wiki/Coordinate_systems

However different medical applications use different definitions of this 3D basis. Most common are the following bases:

• LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit

$LPS = \begin{Bmatrix} \text{from right towards left} \\ \text{from anterior towards posterior} \\ \text{from inferior towards superior} \end{Bmatrix}$

• RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer

$RAS = \begin{Bmatrix} \text{from left towards right} \\ \text{from posterior towards anterior} \\ \text{from inferior towards superior} \end{Bmatrix}$

Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.

## References

1. This SO thread summarizes some of the history of the Math and SimpleMathJax extensions https://stackoverflow.com/questions/29387372/how-to-embed-maths-in-mediawiki