Skip to content

Commit c299161

Browse files
committed
Minor fixes
1 parent 4433117 commit c299161

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

gui/SinglePatientComponent/PatientResultsSidePanel/TumorCharacteristicsWidget.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ def __init__(self, patient_uid, report_uid, structure_name, parent=None):
3232

3333
def __set_interface(self):
3434
self.layout = QVBoxLayout(self)
35-
self.__set_multifocality_part()
3635
self.__set_volumes_part()
3736
self.__set_shape_part()
37+
self.__set_multifocality_part()
3838
self.__set_laterality_part()
3939
self.__set_resectability_part()
4040
self.__set_cortical_structures_part()
@@ -70,7 +70,7 @@ def __set_volumes_part(self):
7070
self.volumes_collapsiblegroupbox.content_layout.setContentsMargins(20, 0, 20, 0)
7171

7272
def __set_shape_part(self):
73-
self.shape_collapsiblegroupbox = QCollapsibleWidget("Shape")
73+
self.shape_collapsiblegroupbox = QCollapsibleWidget("Diameters")
7474
self.shape_collapsiblegroupbox.set_icon_filenames(expand_fn=os.path.join(os.path.dirname(os.path.realpath(__file__)),
7575
'../../Images/collapsed_icon.png'),
7676
collapse_fn=os.path.join(os.path.dirname(os.path.realpath(__file__)),
@@ -180,7 +180,7 @@ def __set_resectability_part(self):
180180
self.resectability_collapsiblegroupbox.content_layout.setContentsMargins(20, 0, 20, 0)
181181

182182
def __set_multifocality_part(self):
183-
self.multifocality_collapsiblegroupbox = QCollapsibleWidget("Tumor")
183+
self.multifocality_collapsiblegroupbox = QCollapsibleWidget("Multifocality")
184184
self.multifocality_collapsiblegroupbox.set_icon_filenames(expand_fn=os.path.join(os.path.dirname(os.path.realpath(__file__)),
185185
'../../Images/collapsed_icon.png'),
186186
collapse_fn=os.path.join(os.path.dirname(os.path.realpath(__file__)),
@@ -752,11 +752,11 @@ def populate_from_report(self, structure_name: str) -> None:
752752
self.laterality_left_label.setText(str(report_json[structure_name]["MNI"]["Location"]['Left laterality (%)']) + ' %')
753753
self.laterality_midline_label.setText(str(report_json[structure_name]["MNI"]["Location"]['Midline crossing']))
754754

755-
if "Shape" in list(report_json[structure_name]["MNI"].keys()):
756-
self.shape_longaxis_label.setText(str(round(report_json[structure_name]["MNI"]["Shape"]['Long-axis diameter (mm)'], 2)) + ' mm')
757-
self.shape_shortaxis_label.setText(str(round(report_json[structure_name]["MNI"]["Shape"]['Short-axis diameter (mm)'], 2)) + ' mm')
758-
self.shape_feret_label.setText(str(round(report_json[structure_name]["MNI"]["Shape"]['Feret diameter (mm)'], 2)) + ' mm')
759-
self.shape_equivalentarea_label.setText(str(round(report_json[structure_name]["MNI"]["Shape"]['Equivalent diameter area (mm)'], 2)) + ' mm')
755+
if "Diameters" in list(report_json[structure_name]["MNI"].keys()):
756+
self.shape_longaxis_label.setText(str(round(report_json[structure_name]["MNI"]["Diameters"]['Long-axis diameter (mm)'], 1)) + ' mm')
757+
self.shape_shortaxis_label.setText(str(round(report_json[structure_name]["MNI"]["Diameters"]['Short-axis diameter (mm)'], 1)) + ' mm')
758+
self.shape_feret_label.setText(str(round(report_json[structure_name]["MNI"]["Diameters"]['Feret diameter (mm)'], 1)) + ' mm')
759+
self.shape_equivalentarea_label.setText(str(round(report_json[structure_name]["MNI"]["Diameters"]['Equivalent diameter area (mm)'], 1)) + ' mm')
760760

761761
if "Multifocality" in list(report_json[structure_name]["MNI"].keys()):
762762
self.multifocality_pieces_label.setText(str(report_json[structure_name]["MNI"]["Multifocality"]['Elements']))

integration_tests/single_patient_module/test_sp_reloading_and_edit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def window():
6464
return window
6565

6666
""" Remaining tests to add:
67+
* Should add a patient with two proper timestamps and all atlases/reports/etc...
6768
# * Changing display space from Patient to MNI and back
6869
"""
6970

utils/data_structures/AtlasStructure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def __reload_from_disk(self, parameters: dict) -> None:
135135
self._timestamp_uid = parameters['investigation_timestamp_uid']
136136
self._timestamp_folder_name = parameters['raw_input_filepath'].split('/')[0]
137137
if os.name == 'nt':
138-
self._timestamp_folder_name = list(PurePath(parameters['raw_input_filepath|']).parts)[0]
138+
self._timestamp_folder_name = list(PurePath(parameters['raw_input_filepath']).parts)[0]
139139

140140
self._raw_input_filepath = os.path.join(self._output_patient_folder, parameters['raw_input_filepath'])
141141
self._class_description = pd.read_csv(self._class_description_filename)

0 commit comments

Comments
 (0)