Commit 7cdf3492 authored by Gabriel Couture's avatar Gabriel Couture

Removing unrelevant dvh attribut for this example project

parent 8aea6d13
Pipeline #191 passed with stage
in 9 seconds
......@@ -14,7 +14,6 @@ class DVH:
volumes: List[float],
dose_unit: str,
volume_unit: str,
structure_name: str = '',
prescription_dose: float = -1):
"""Constructor of a DVH object.
......@@ -23,7 +22,6 @@ class DVH:
volumes: Volumes list.
dose_unit: Dose units, only 'GY' and '%' or supported.
volume_unit: Volume units, only 'CM3' and '%' or supported.
structure_name: The Structure name (i.e. prostate).
prescription_dose: The prescription doses, which is needed for the
conversion from absolute to relative dose values.
......@@ -35,7 +33,6 @@ class DVH:
self.volume_unit = volume_unit
self.prescription_dose = prescription_dose
self.structure_name = structure_name
self._valid_units_format()
......@@ -76,7 +73,6 @@ class DVH:
volumes=dvh_data['volumes'],
volume_unit=dvh_data['volume_units'],
prescription_dose=dvh_data['prescription_dose'],
structure_name=dvh_data['structure_name']
)
def write_to_json(self, file_path: str) -> None:
......@@ -90,7 +86,6 @@ class DVH:
"""
dvh_data = {
'structure_name': self.get_structure_name(),
'doses': self.get_doses(),
'dose_units': self.get_dose_unit(),
'volumes': self.get_volumes(),
......@@ -116,11 +111,5 @@ class DVH:
def get_prescription_dose(self) -> float:
return self.prescription_dose
def get_structure_name(self) -> str:
return self.structure_name
def set_prescription_dose(self, prescription_dose: float) -> None:
self.prescription_dose = prescription_dose
def set_structure_name(self, structure_name: str) -> None:
self.structure_name = structure_name
{"structure_name": "", "doses": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], "dose_units": "GY", "volumes": [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0], "volume_units": "CM3", "prescription_dose": -1}
\ No newline at end of file
{"doses": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], "dose_units": "GY", "volumes": [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0], "volume_units": "CM3", "prescription_dose": -1}
\ No newline at end of file
......@@ -17,7 +17,6 @@ A_STRUCTURE_NAME = 'A_STRUCTURE_NAME'
A_PRESCRIPTION_DOSE = 15
A_DVH_DATA = {
'structure_name': A_STRUCTURE_NAME,
'doses': A_DOSE_ARRAY,
'dose_units': A_VALID_DOSE_UNIT,
'volumes': A_VOLUME_ARRAY,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment