annotation package¶
Submodules¶
annotation.class_symptome module¶
This module defines a Symptome class used for instantiating symptom objects.
- class annotation.class_symptome.Symptome(ID=None, Name=None, Lateralization=None, Topography=None, Orientation=None, AttributSuppl=None, Tdeb=None, Tfin=None, Comment=None)¶
Bases:
objectA class used to instantiate a Symptome object with all its attributes.
- ID¶
The ID of the symptom.
- Type:
str
- Name¶
The name of the symptom.
- Type:
str
- Lateralization¶
The lateralization of the symptom.
- Type:
str
- Topography¶
The topography of the symptom.
- Type:
str
- Orientation¶
The orientation of the symptom.
- Type:
str
- AttributSuppl¶
Additional attributes of the symptom.
- Type:
str
- Tdeb¶
The start time of the symptom.
- Type:
str
- Tfin¶
The end time of the symptom.
- Type:
str
- Comment¶
Any additional comments related to the symptom.
- Type:
str
- get_AttributSuppl()¶
Returns the additional attributes of the symptom.
- get_Comment()¶
- get_ID()¶
Returns the ID of the symptom.
- get_Lateralization()¶
Returns the lateralization of the symptom.
- get_Name()¶
Returns the name of the symptom.
- get_Orientation()¶
Returns the orientation of the symptom.
- get_Tdeb()¶
Returns the start time of the symptom.
- get_Tfin()¶
Returns the end time of the symptom.
- get_Topography()¶
Returns the topography of the symptom.
- get_attributs()¶
Returns a list containing the values of the object’s attributes.
- Returns:
- A list containing the values of all attributes.
[ ID, Name, Lateralization, Topography, Orientation, AttributSuppl, Tdeb, Tfin, Comment ]
- Return type:
listofstr
- set_AttributSuppl(new_AttributSuppl)¶
Sets the additional attributes of the symptom.
- set_Comment(new_Comment)¶
Sets any additional comments related to the symptom.
- set_ID(new_ID)¶
Sets the ID of the symptom.
- set_Lateralization(new_Lateralization)¶
Sets the lateralization of the symptom.
- set_Name(new_Name)¶
Sets the name of the symptom.
- set_Orientation(new_Orientation)¶
Sets the orientation of the symptom.
- set_Tdeb(new_Tdeb)¶
Sets the start time of the symptom.
- set_Tfin(new_Tfin)¶
Sets the end time of the symptom.
- set_Topography(new_Topography)¶
Sets the topography of the symptom.
annotation.pop_up module¶
This module defines a SymptomeEditor class for editing symptom attributes via a graphical user interface.
- class annotation.pop_up.SymptomeEditor(Symp)¶
Bases:
CTkToplevelSymptomeEditor class for editing symptom attributes via a graphical user interface. Allows editing of symptoms through a window.
- Symp¶
An instance of the Symptome class representing the symptom to be edited.
- Type:
Symptome
- apply_changes(Symp)¶
Retrieves the entered values and updates the attributes of the Symp class.
- Parameters:
Symp (
Symptome) – The Symptome object to be updated.
- create_entry(label_text, initial_value, i)¶
Creates and places text entry fields (entries) on the window.
- Parameters:
label_text (str) – The label for the entry.
initial_value (str) – The current value of the entry.
i (int) – The index of the entry row.
annotation.load_symptomes module¶
Functions for loading symptoms from text files
- annotation.load_symptomes.read_symptoms(filename)¶
Reads a text file containing symptoms and returns a list of Symptome objects.
- Parameters:
filename (str) – The path to the text file containing symptoms.
- Returns:
A list of Symptome objects.
- Return type:
list
annotation.search_bar¶
- class annotation.search_bar.search_symptomes(root, symptoms_struct, myfunc, width)¶
Bases:
objectA class to create a symptom search bar in the EpiScope GUI.
This class provides a search bar to look for symptoms in a hierarchical dictionary structure and display the matching results in a listbox. It also allows selecting an item from the listbox by clicking on it, triggering a specified function with the selected item as an argument.
- symptoms_structure¶
Hierarchical dictionary containing organized symptom data.
- Type:
dict
- search_entry¶
Entry widget for user input.
- Type:
CTkEntry
- symptom_listbox¶
Listbox widget to display search results.
- Type:
Listbox
- search_element(search_term)¶
Searches for matching elements based on the search term.
- get_selected(event, func)¶
Retrieves the selected item from the listbox.
- update_search(event)¶
Updates the listbox based on the search input.
- get_selected(event, func)¶
Retrieves the selected item from the listbox and calls the specified function.
- Parameters:
event – The event object (not used directly, but required by Tkinter).
func (function) – Function to be called with the selected item as an argument.
- search_element(search_term)¶
Searches for elements matching the search term in the ‘Designation’ and ‘Description’ columns.
- Parameters:
symptoms_structure (dict) – Hierarchical dictionary containing organized symptom data.
search_term (str) – Term to search for in ‘Designation’ and ‘Description’ columns.
- Returns:
List of matching elements found for the search term.
- Return type:
list
This function searches for the specified term in the ‘Designation’ and ‘Description’ columns of the hierarchical structure and returns a list of matching elements.
- update_search(event)¶
Update the displayed symptoms based on the user input in the search bar.
This function filters the symptoms based on the user input in the search bar and updates the listbox to show only the matching symptoms.
- Parameters:
event – The event object (not used in this function, but required by Tkinter)