✨ feat(data_processing.py): add raw_data parameter to get_advanced_data function to improve flexibility
The L variable was not being computed in the get_advanced_data function, which is necessary for the calculation of the tortuosity. The raw_data parameter was added to the get_advanced_data function to improve flexibility and allow for more advanced calculations to be performed.
🐛 fix(input.py): add filename attribute to ScannedObject class
The filename attribute was not being set in the ScannedObject class, which is necessary for generating the output file headers.
✨ feat(output.py): add function to generate headers for output file
The generate_headers function was added to generate the headers for the output file. The headers include the filename, date, version, discretisation method, and whether the data was verticalised.
🚀 chore(MainWindow.py): enable process_advanced_data function
🎨 style(MainWindow.ui, UI_MainWindow.py): adjust GUI layout and label text for better user experience
The GUI layout has been adjusted to improve the user experience. The window width has been reduced from 1419 to 1336 pixels to better fit the screen. The minimum and maximum sizes of the MainSettings widget have been increased from 518 to 600 pixels to allow for more space for the labels. The labels have been updated to include the units of measurement to improve clarity.
🐛 fix(AdvancedDataWorker.py): add raw_data parameter to __init__ method
✨ feat(AdvancedDataWorker.py): add support for raw data processing in get_advanced_data method
The AdvancedDataWorker class now has a raw_data parameter in its __init__ method, which is used in the get_advanced_data method. This allows for raw data processing in addition to the existing discrete data processing.
🐛 fix(DiscreteDataWorker.py): generate headers before formatting data
✨ feat(DiscreteDataWorker.py): add support for generating headers in output file
The DiscreteDataWorker class now generates headers for the output file if the add_headers setting is enabled. The headers are generated before formatting the data to ensure that the headers are included in the output file.
🐛 fix(PreProcessWorker.py): set filename of ScannedObject
The PreProcessWorker class now sets the filename of the ScannedObject to the basename
🎨 style(UI_Settings.py): reorganize widgets in the settings UI for better readability
🐛 fix(data_extraction.py): fix standard deviation calculation to use unbiased estimator
🔧 chore(SettingManager.py): add "add_headers" setting with default value of True
The changes in UI_Settings.py are purely cosmetic and do not affect the functionality of the code. The fix in data_extraction.py corrects the standard deviation calculation to use the unbiased estimator. The addition of the "add_headers" setting in SettingManager.py allows for the addition of headers to output files.
The variable names σ_〈R〉 and σ_〈R〉^tot were corrected to σ_<R> and σ_<R>^tot respectively to improve consistency with the naming conventions used in the rest of the code.
This commit adds missing variables to the documentation of the `get_advanced_data` function in `data_processing.py`. The added variables are `H`, `L`, `l`, `MI_mR`, `MI_mH`, `MI_mr_in`, `V_scan`, `R_V_scan`, `S_V_scan`, and `HI`. This improves the documentation of the function and makes it easier for developers to understand the function's behavior.
🐛 fix(data_processing.py): fix typo in advanced data keys and add R_max to advanced data
✨ feat(MainWindow.py): add support for exporting advanced data to a text file
🎨 style(MainWindow.ui, UI_MainWindow.py): change the display of advanced data labels to use <R> instead of 〈R〉 and σ<R> instead of σ〈R〉
The README.md file now reflects the fact that the tool can now read .stl files. The advanced data keys in data_processing.py have been fixed to use the correct symbols and R_max has been added to the advanced data. The MainWindow.py now allows the user to export the advanced data to a text file. The display of advanced data labels in MainWindow.ui and UI_MainWindow.py has been changed to use <R> instead of 〈
The first letter of the title "Analyse morphologique" was not capitalized, which is inconsistent with the usual capitalization rules for titles.
🖼️ chore(README.md): update image and fix typo in rotation instructions
The image in the README.md file was updated to reflect the correct rotation instructions. A typo in the rotation instructions was also fixed.
👥 chore(README.md): fix typo in contributor's role
A typo in the role of one of the contributors was fixed.
🐛 fix(data_processing.py): add missing half discretisation values to L calculation
The calculation of L in the get_advanced_data function of data_processing.py was missing half the discretisation values at the beginning and end of the object.
🐛 fix(input.py): remove print statement
A print statement was accidentally left in the from_xyz_file method of the ScannedObject class in input
The function parameter `update_progress_bar` has been renamed to `progressbar_placeholder` to improve the semantics of the function. This change does not affect the functionality of the code.
✨ feat(data_processing.py): add new morphological indicators to the output of the `get_advanced_data` function
The `get_advanced_data` function now calculates and returns the following morphological indicators:
- MI_mR: the ratio of the maximum radius to the mean radius
- MI_mH: the ratio of the maximum radius to the height of the object
- V_scan: the volume of the scanned object
- R_V_scan: the radius of a sphere with the same volume as the scanned object
- S_V_scan: the surface area of a sphere with the same volume as the scanned object
- R_h: the hydraulic radius of the object
- HI: the hydraulic index of the object
✨ feat(MainWindow.py): add functionality to export advanced data to a text file
🚀 feat(MainWindow.py): add button to export advanced data to a text file
🚀 feat(MainWindow.ui): update labels for Volume and Surface to include units
The keys in the dict returned by the get_advanced_data function were updated to be more descriptive. The export_advanced_data function was added to the MainWindow class to allow the user to export the advanced data to a text file. A button was added to the GUI to allow the user to export the advanced data. The labels for Volume and Surface were updated to include the units of measurement.
🎨 style(UI_MainWindow.py): rename tab_5 to parameters and tab_6 to values for better semantics
The names of the tabs have been changed to better reflect their contents. The tab previously named tab_5 is now named parameters, and the tab previously named tab_6 is now named values. This improves the readability and maintainability of the code.
🎨 style(UI_MainWindow.py): rename tab_6 to values and tab to graph_pane_1, tab_2 to graph_pane_2, tab_3 to graph_pane_3, and tab_4 to graph_pane_4 for better semantics
This commit only renames the tabs in the UI_MainWindow.py file to improve the semantics of the code. The tab_6 is renamed to values, and tab, tab_2, tab_3, and tab_4 are renamed to graph_pane_1, graph_pane_2, graph_pane_3, and graph_pane_4, respectively.
🔨 refactor(UI_MainWindow.py): update labels for volume and surface to include units
The labels for volume and surface have been updated to include the units of measurement in millimeters. The tab names for the settings and graph panes have also been updated to improve readability and consistency with the naming conventions.
🔨 refactor(AdvancedDataWorker.py): update keys in the dict returned by the function to be more explicit
🔨 refactor(position_manipulation.py): remove unnecessary computation of the center of gravity in the verticalise function
The keys in the dict returned by the AdvancedDataWorker function have been updated to be more explicit. The keys 'Volume' and 'Surface' have been updated to 'Volume en mm3' and 'Surface en mm2' respectively to indicate the units of measurement. In the position_manipulation.py file, the computation of the center of gravity in the verticalise function was unnecessary and has been removed to improve performance.
✨ feat(data_processing.py): add function to calculate morphological indicators from discrete data
The variable name teta_diffs was changed to theta_diffs to improve semantics. A new function was added to calculate morphological indicators from discrete data. The function calculates Tortuosity, Volume, Surface, Mean radius, Standard deviation of radius, Sigma r tot, MI_l, and MI_p.
🔥 refactor(input.py): remove unused result_file_path parameter from ScannedObject constructor and from_xyz_file method
✨ feat(input.py): add encoding parameter to open method in from_obj_file and from_xyz_file methods
The result_file_path parameter was not being used in the ScannedObject constructor and from_xyz_file method, so it was removed to simplify the code. The encoding parameter was added to the open method in the from_obj_file and from_xyz_file methods to ensure that the files are opened with the correct encoding.
🐛 fix(output.py): add utf-8 encoding when writing to output file
✨ feat(output.py): remove unused import and function argument, improve code readability
The fix adds the utf-8 encoding when writing to the output file to avoid encoding issues. The feat removes the unused import and function argument to improve code readability. The function format_data now only takes the necessary arguments and the unused import is removed.
🐛 fix(main_window.py): fix typo in function name
✨ feat(main_window.py): add persistence to pre-processed data
The fix corrects a typo in the function name get_true_theta_from_x_y. The feat adds persistence to the pre-processed data by storing the raw data, discrete data, and advanced data in the main window. This avoids re-computation of the data when switching between tabs.
🎨 style(MainWindow.ui): add export_advanced_metrics button to the UI
🎨 style(UI_MainWindow.py): add export_advanced_metrics button to the UI
🎨 style(ressources_rc.py): update the resource file
🐛 fix(data_extraction.py): fix typo in function name get_mean_teta to get_mean_theta
The changes add a new button to the UI named "export_advanced_metrics" which allows the user to export variables. The resource file is updated to reflect the changes. The typo in the function name get_mean_teta is fixed to get_mean_theta.
🚀 feat(MainWindow.py): add support for calculating advanced data in a separate thread
🚀 feat(AdvancedDataWorker.py): add worker to calculate advanced data in a thread
The `get_advanced_data` function was added to calculate advanced data from the discrete data. The `process_advanced_data` function was added to the `MainWindow` class to start a thread to calculate the advanced data. The `AdvancedDataWorker` class was added to calculate the advanced data in a separate thread. This allows the application to be more responsive and not freeze while the advanced data is being calculated.
✨ feat(data_processing.py): remove deprecated get_discrete_vertices2 method and rename get_discrete_vertices3 to get_discrete_vertices. Simplify get_discrete_vertices method by removing the selection of the discretisation method from the settings and always using the Z0-Zi < DeltaZ method. This improves code readability and maintainability.
✨ feat(input.py): remove deprecated result_file_path and bruteforce_discretization_result attributes from ScannedObject class. Add old_delta, old_discrete, and old_discrete_type attributes to cache the results of the get_discrete_vertices method. This improves performance by avoiding unnecessary recomputations of the discretized vertices.
✨ feat(MainWindow.py): add support for selecting a layer to display discrete graphs for. Add two new graph types: "Coupe de la couche" and "Difference entre le rayon de chaque points
🔧 fix(ui): change tab index to display the correct tab on startup
✨ feat(ui): add label and combobox to select layer to display
🔧 fix(worker): add discretisation_value parameter to PreProcessWorker constructor
✨ feat(math): add get_true_teta_from_x_y, get_difference_from_mean_value, and get_distance_between_two_vertices functions
The UI fix changes the tab index to display the correct tab on startup. The new label and combobox allow the user to select the layer to display. The worker fix adds a discretisation_value parameter to the PreProcessWorker constructor. The new math functions are get_true_teta_from_x_y, get_difference_from_mean_value, and get_distance_between_two_vertices. These functions are useful for calculating teta, differences from mean values, and distances between vertices.