## 2 Methods
### Testing and Validation  
Testing the integrated system's performance was a preliminary task of an extensive research project developed in a partnership between this research team, the NOVA Medical School research center, and the Rheumatology Service of a referral hospital in Lisbon, Portugal.  
This preliminary study included eight patients diagnosed with AS. The inclusion criteria were precise, which limited the sample size, and included the following requirements:  
* Age over 18 years old;
* Diagnosis of Ankylosing Spondylits according to the Modified New York criteria [41; 42; 43];
* Body mass index below 35 kg/m\({}^{2}\);
* No pregnancy or breastfeeding;  
Figure 5: (**a**) Angle of lumbar lordosis (Cobb angle); (**b**) 3D representation of the spine.  
* No infections requiring hospitalisation or antibiotics;
* No uncontrolled medical illness;
* No total ankylosis of the spine;
* X-rays of the spine in the sagittal and coronal planes;
* Radiographs taken within less than two years since the biomechanical changes in the spine are insignificant during a shorter period [44; 45].  
The institutional Medical Ethics Review Board granted ethical approval. All subjects read written information about the aims and plans of the study. A brief questionnaire, including biographic and biometric details, was completed, and all patients signed a consent form before data collection.  
Some requirements were established to reduce the effect of external variables and guarantee the comparability of the measures:  
* The same physician identified the cutaneous projection of the apex through palpatory anatomy;
* The same researcher carried out data collection;
* The sampling method was random.  
Nine consecutive measurements with VM were carried for each patient. As the inclusion criteria, the number of measures respected the requirements of the global study, which included the analysis of postural adjustments using the VM as the assessment tool. The nine measurements were performed with a single fluorescent marking procedure.  
The model fixed the rotation angles of C6 and S1 according to the values found in the literature.  
New devices for application in clinics must be validated through comparison with the gold standard techniques. For this reason, after data collection, the results were carefully compared with the patient's radiographs.  
Regarding the analysis of the radiographs, Adobe Photoshop CC 2015(r) was used to measure the proper angles. The same evaluator performed the multiple steps involved. In each radiograph and for each vertebra, the following parameters were identified:  
* The upper limits of the surfaces of the vertebral body;
* The lower limits of the surfaces of the vertebral body;
* The upper and lower limits of the apex.  
The previous parameters were used in the Cobb method [46] to find the amplitude of the dorsal kyphosis, the lumbar lordosis, and the intervertebral angles.  
Together with the data provided by the mathematical model, this information was processed using SPSS(r) (version 20.0).  
The Bland-Altman method was applied to compare the data [47; 48]. It is based on a plot analysis and it is adequate \"to evaluate a bias between the mean differences, and to estimate an agreement interval, within which 95% of the differences of the second method, compared to the first one, fall\" [49]. The choice for the validation method is also supported by the following facts: (i) it is one of the most used methods to investigate the agreement between different approaches that provide the same measure and it is especially common for studies within the clinical context [50; 51; 52; 53; 54; 55]; (ii) the measuring principles underlying the VM device were validated using the same method [46].