The software was designed in such a way that the code is as reusable as possible. View objects, control functions and variables are separated into blocks so that adding or removing any feature is easy. The view objects are the menu bar and user interface controls (UIC). UIC are all objects that are not in the menu bar. The view objects are programmatically defined in the RadonS_OpeningFcn function found in the main GUI file (RadonS.m). In the function, it can add or remove visual elements such as buttons, text, axes, among others. Visual objects call control functions sharing information through the variable block. The variables are initialized and organized in a handle by the external function variable_initialization.m. A designer can add or remove variables by editing this function. The user can only modify the variables that the GUI allows.
The control block has a hierarchical flow. The user is forced to follow the order by enable/disable menu options. The user executes the control functions through the menu bar which was described in subsection 1.1.1 Graphical User Interface. This block uses functions developed by us and functions of the MATLAB Image Processing Toolbox. The functions developed by us (external functions) are in separate files to the GUI. External functions can be modified, for a new requirement, without modifying other files. For example, the open binary images control calls an external function (image_segmentation.m) to segment the image, thus ensuring it is binary. This function uses the Otsu method, however the method can be changed (directly in the image_segmentation.m file) without modifying the software in general. This makes the code more reusable. Similarly with area_normalization.m, filtering.m, Radon_transform.m, inverse_Radon_transform.m and, differences_image.m functions. In contrast, the functions to export the results (Data and Images) are within the main GUI file, so modifying them would imply a redesign of the GUI.