- The raw CT scans can be found under Data/ct_scans. There are two folders, each corresponding to two different CT scans.
- Masks for artefacts can be found under artcon_DE_CTPA_1_5_Bv38_2_F_0.nrrd or pe_DE_CTPA_1_5_Bv38_2_F_0.nrrd .
- The raw CT scan is saved under DE_CTPA_1_5_Bv38_2_F_0.nrrd
- To convert the .nrrd files to .mat one can run the script called nrrd_to_mat_files.py.
- To analyse the data, the ct scans need to be converted to 2d slices, which can be done by running nrrd_to_mat_files.py.
- The slice data can be found in Data/ct_scans/ct1.
- They are saved as .mat files with fields CT and labels
- The labels are 2d arrays that are zero where the structure is not present in the image. They need to be converetd to a binary mask.
The main file is called experiments_gradM_M.m. The input is a slice data .mat file that have fields CT, texture_mask and labels with both arrays being the same size. These can be found under
Data/ct_scans/ct1. These were made from the slices created by running nrrd_to_mat_files.py by adding a new field called texture_mask. This represents an area in the image whose pixel intensity should have the same distribution as the pixel intensity inside the area where the arteafact is found. texture_mask is used to set the radii of the balls that define the set
Running experiments_gradM_M.m will iterate through a user defined list of detector setups (different noise and number of angles), radii for the balls defining the set
The result_path will be found under Figures and will be named after the types of norm used to define the balls bounding the energy of the gradient and intensity of the image within the artefact location
This script will display the map estimate for the specified slice with name slice_name which was simulated using noise levels and number of angles that are specified by the user in the scipt (line 43 at writing this guide).
The user then has the choice to define a texture_mask and an artefact mask by adding an if statement as the ones present as from line 79, and saving a .mat file with entries
'xmap','fid','reg','norm_it','snr_it','time_it','time_total',...
'texture_mask','mask_struct','im_true','CT'
where the 'mask_struct' shows the location of the artefact the user detected in the xmap, and 'texture_mask' shows an area whose pixel intensity will drive the radii of the balls defininf the set
This script uses the output from inspect_xmap.m to run BUQO on the artefacts whose location and sampled pixels are defined by mask_struct and texture_mask in the .mat files saved at Data/aretfacts. The output is saved under Figures/[folder_name] where [folder_name] has naming convention artefact_[Lx_gradM_Lx_M].
The main function reads all nrrd files in a location containing nrrd files specified in the raw data section and converts them into a .mat.
The loop specified in the file will iterate through slices of the specified raw CT scan and a corresponding .nrrd files corresponding to a mask and save the label-image pair in a .mat file as 2d slices.
This is a jupyter notebook that reads the output of the BUQO algorithm from the specified folder and converts the metrics and results in a panadas dataframe. The pandas dataframe can then be used to plot the different results for publication/presentations.