Commit Graph

67 Commits

Author SHA1 Message Date
914d6bb7cb 📝 docs(README.md): capitalize the first letter of the title
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
2023-05-12 09:13:21 +02:00
d64c8dd333 🐛 fix(input.py): handle case where faces is None in ScannedObject constructor
 feat(input.py): add support for reading .xyz files and raise InvalidFileFormat exception if file format is not supported
🚸 chore(gui): add warning popup when trying to use Mesh3D graph with .xyz file
🚸 chore(gui): refactor MainWindow.check_input_file method to handle .xyz files
🚸 chore(gui): refactor PreProcessWorker to use ScannedObject.from_file method
🚸 chore(math): add check for faces in verticalise function to avoid errors when faces is None
The ScannedObject constructor now handles the case where faces is None. Support for reading .xyz files has been added, and an InvalidFileFormat exception is raised if the file format is not supported. A warning popup has been added to the MainWindow when trying to use the Mesh3D graph with a .xyz file. The MainWindow.check_input_file method
2023-05-11 15:03:38 +02:00
4430309b41 chore: remove unused files 2023-05-11 14:37:23 +02:00
6d03b848d1 📝 docs(README.md): improve readability and fix typos
This commit improves the readability of the README.md file by fixing typos and grammatical errors. The changes include correcting the capitalization of some words, fixing the spelling of some words, and improving the formatting of the text. The commit also adds instructions for using the 2D and 3D graphs, and adds information for developers, including the variable naming convention, the use of relative imports, and the use of Qt Designer. Finally, the commit adds a contributors section to acknowledge the contributions of the developers who worked on the project.
2023-05-11 14:06:22 +02:00
d1811b99b9 📝 docs(README.md): update README with new features and installation instructions
The README file has been updated to include a more detailed description of the Analyse Morphologique tool, including its features and capabilities. Additionally, installation and usage instructions have been added to the README file to help users get started with the tool.
2023-05-11 09:58:03 +02:00
6803443385 🔖 chore(SettingManager.py): update version to 1.2.0
🔨 refactor(SettingManager.py): reorder authors list and update description
The version number has been updated to 1.2.0 to reflect the changes made to the application. The authors list has been reordered and the description has been updated to provide a more detailed explanation of the tool's functionality.
2023-05-10 16:33:53 +02:00
46f914323e 🎨 style(UI_MainWindow.py): set x_mean QDoubleSpinBox to read-only
The x_mean QDoubleSpinBox is now set to read-only to prevent the user from changing its value.
2023-05-10 15:55:57 +02:00
283930b1b0 🎨 style(MainWindow.ui, UI_MainWindow.py): update GUI elements default values
The default value of the "show_graph_checkbox" element has been changed from false to true. The "x_mean" element has been set to read-only mode. The "scrollAreaWidgetContents" element has been shifted upwards by 179 pixels to improve the layout. These changes improve the user experience and make the GUI more intuitive.
2023-05-10 15:54:51 +02:00
e1d3ad7a55 🔧 refactor(MainWindow.py): move connection of refresh_advanced_metrics button to its own method
🔧 refactor(MainWindow.py): rename process_advanced_data method to process_advanced_metrics to improve semantics
🔧 refactor(AdvancedDataWorker.py): add V_scan parameter to constructor to improve semantics
🔧 refactor(Settings.py): add conditional to set output_file_separator to '\t' if '\\t' is entered
The refresh_advanced_metrics button is now connected to its own method to improve readability. The process_advanced_data method has been renamed to process_advanced_metrics to better reflect its purpose. The AdvancedDataWorker constructor now takes a V_scan parameter to improve semantics. The Settings class now has a conditional to set the output_file_separator to '\t' if '\\t' is entered to improve consistency.
2023-05-10 15:44:52 +02:00
033ecb96b2 feat: added new indicators to the values tab 2023-05-10 15:44:27 +02:00
aeb8c6ed44 🔨 refactor(data_processing.py): rename function parameter to improve semantics
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
2023-05-10 15:43:01 +02:00
16f43c2126 🔧 chore(data_processing.py): update keys in the dict returned by get_advanced_data function to be more descriptive
 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.
2023-05-10 09:59:44 +02:00
fb2bb6e9ce 🐛 fix(data_test.py): change variable name from teta_diffs to theta_diffs to improve semantics
 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.
2023-05-09 10:56:43 +02:00
4402085620 📝 docs(DiscreteDataWorker.py): add docstring to run() method
This commit adds a docstring to the run() method in the DiscreteDataWorker class. The docstring explains what the method does, what it calculates, and what it emits. It also mentions that the result is saved in a file located in the output_path. This improves the readability and maintainability of the code.
2023-05-09 10:54:28 +02:00
a0e05be919 📝 docs(AdvancedDataWorker.py): update docstrings to reflect changes in the module
The name of the module has been changed to AdvancedDataWorker.py to better reflect its functionality. The description has been updated to include the extraction of morphological indicators. The parameters and instance variables have been updated to reflect the change in functionality. The run() method has been updated to include a description of the emitted signal and the keys of the dictionary that is emitted.
2023-05-09 10:54:06 +02:00
8357be8015 🔨 refactor(PreProcessWorker.py): rename objpath to obj_path and discretisation_value to delta_z for better readability
This commit renames the objpath parameter to obj_path and discretisation_value to delta_z for better readability and consistency with the naming conventions. The function run() has been updated to include a more detailed description of what it does.
2023-05-09 10:53:45 +02:00
a12b42381b 📝 docs(RawDataWorker.py): add docstring to run method
🐛 fix(RawDataWorker.py): fix typo in theta key name in the output dict
 feat(RawDataWorker.py): save the result of the calculation in a file located in the output_path
The run method now has a docstring that explains what it does. The typo in the theta key name in the output dict has been fixed. The result of the calculation is now saved in a file located in the output_path. This improves the functionality of the RawDataWorker class.
2023-05-09 10:53:21 +02:00
dce613fd9e 🚀 feat(data_processing.py): add function to calculate advanced data
🚀 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.
2023-05-04 13:28:03 +02:00
2c2cae2d25 feat: added tabs that shows the calculated values for the layer and the global values 2023-05-04 13:27:37 +02:00
8175561250 🐛 fix(.gitignore): add test.py to the list of ignored files
 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.
2023-05-03 17:26:11 +02:00
78ab03e9d8 🎨 chore(gui): add INRAE logo and about window to the GUI
 feat(gui): add an about window to the GUI to display information about the software
The INRAE logo has been added to the GUI as a resource. An about window has been added to the GUI to display information about the software such as the description, authors, and version. The about window can be accessed via the "A propos de ce logiciel" menu item.
2023-05-02 14:21:05 +02:00
538d339b6a 🐛 fix(SettingManager.py): change authors value to a list to match the expected format
The authors value was previously a string with multiple authors separated by a comma. The value has been changed to a list of strings to match the expected format.
2023-05-02 14:17:54 +02:00
fc525a0878 🔖 chore(SettingManager.py): add version attribute to SettingManager class and update config.yml version if needed
The SettingManager class now has a version attribute to keep track of the version of the configuration file. If the version in the configuration file is different from the version in the SettingManager class, the version in the configuration file is updated to match the version in the SettingManager class. This ensures that the configuration file is always up-to-date with the latest version of the application.
2023-05-02 10:33:56 +02:00
bb6f078ec2 🐛 fix(MainWindow.py): fix bug where graph settings were not being saved when the number of graphs was changed
 feat(MainWindow.py): add functionality to save graph settings when the number of graphs is changed
The bug was caused by the fact that the graph settings were not being saved when the number of graphs was changed. This was fixed by adding code to save the graph settings when the number of graphs is changed. The new functionality allows the user to change the number of graphs and have the graph settings saved.
2023-05-02 10:25:09 +02:00
ef1cf64759 🎨 style(visplot_render.py): add camera distance to improve 3D visualization
The camera distance is set to 10 to improve the 3D visualization of the object. This change is purely cosmetic and does not affect the functionality of the code.
2023-05-02 10:20:24 +02:00
0ae697096c 🔨 refactor(MainWindow.py): add graph_type_changed method to handle changes in graph type selection
 feat(MainWindow.ui): add a label and a spinbox to display the number of graphs selected
The graph_type_changed method is added to handle changes in the graph type selection. It updates the number of graphs selected and displays it in the newly added spinbox. The label is also added to display the text "Nombre de graphes :".
2023-05-02 10:11:04 +02:00
2ef063f4b3 refactor(MainWindow.py): rename 'completed' variable to 'completed_tasks' and 'comboBoxes' to 'combo_boxes' for better semantics
feat(MainWindow.py): add 'has_changed' and 'old_discretisation_value' variables to track changes in the discretisation value selector and avoid unnecessary computations
fix(MainWindow.py): set status message when rendering graphs to inform the user of the process
2023-05-02 09:53:31 +02:00
18eaf6a016 feat(MainWindow.py): set default output folder path to input file's directory if output folder path is empty or None when selecting a file. 2023-05-02 09:25:19 +02:00
33ebfe9192 refactor(MainWindow.ui, UI_MainWindow.py): change window title from "MainWindow" to "Analyse Morphologique" for better user experience 2023-05-02 09:21:36 +02:00
c885cf989b refactor: remove unused code and files from the project 2023-05-02 09:21:19 +02:00
d03d6500a0 added more docstrings 2023-04-28 11:34:22 +02:00
d2e3a43571 added option to export the verticalised 3d object 2023-04-28 10:30:48 +02:00
496c0bd84f fixed typo 2023-04-28 10:20:39 +02:00
117a1de791 Added Error management when no file or folder is selected 2023-04-28 10:15:48 +02:00
7bb86e2607 Added ErrorPopup window 2023-04-28 10:15:08 +02:00
5897f874b5 added labels to graphs axis 2023-04-28 09:41:56 +02:00
39e6f494bd renamed graphs 2023-04-27 15:22:32 +02:00
31c8820581 Bug fixes 2023-04-27 14:17:27 +02:00
5a546b5e9c Finished settings 2023-04-27 14:03:45 +02:00
ff20488ceb Added Setting to program + fixed one typo 2023-04-27 13:23:02 +02:00
18960e8e33 added setting manager 2023-04-27 13:10:37 +02:00
8c964967c2 added new panes in code 2023-04-27 10:30:13 +02:00
9b4b630d8d added new panes in ui 2023-04-27 10:29:29 +02:00
ad086892c7 fixed cross_sections not showing up 2023-04-26 16:26:27 +02:00
d3136a12b6 finished graphs 2023-04-26 15:45:34 +02:00
bbe7a04d2c stub 2023-04-25 13:31:51 +02:00
dc412bb8e8 graph gui almost done 2023-04-25 12:48:05 +02:00
ac4f4410a2 first functionnal gui 2023-04-24 15:55:40 +02:00
4281060c8d minimal gui 2023-04-24 14:35:59 +02:00
7a61f23d33 Docstrings, translations and other metadata fixes 2023-04-24 09:54:28 +02:00