Skip to content

Commit

Permalink
#23 for IRE v2.5 assume only one lesion has been treeated when no chi…
Browse files Browse the repository at this point in the history
…ldren trajectory available
  • Loading branch information
rmsandu committed Nov 28, 2018
1 parent 0f7ce1d commit 7cc19fc
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions XMLProcessing/parseNeedleTrajectories.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,31 +270,32 @@ def III_parseTrajectory(trajectories, patient, ct_series, xml_filepath, time_int
IV_parseNeedles(children_trajectories, lesion, needle_type, ct_series, xml_filepath, time_intervention,
cas_version)

elif (xmlTrajectory['type'] and 'EG_ATOMIC' in xmlTrajectory['type']) :
# assuming 'EG_ATOMIC_TRAJECTORY' stands for MWA type of needle
needle_type = "MWA"
# drop the lesion identification for MWA. multiple needles might be
# no clear consensus for minimal distance between lesions and no info in the log version <=2.9
lesion = patient.findLesion(lesionlocation=tp_planning, DISTANCE_BETWEEN_LESIONS=3)
if lesion is None:
lesion = patient.addNewLesion(tp_planning, time_intervention)
children_trajectories = xmlTrajectory
IV_parseNeedles(children_trajectories, lesion, needle_type,
ct_series, xml_filepath, time_intervention, cas_version)

elif not (xmlTrajectory['type'] and 'EG_ATOMIC' in xmlTrajectory['type']):
# the case when CAS XML Log is old version 2.5
# the distance between needles shouldn't be more than 22 mm according to a paper
# DISTANCE_BETWEEN_LESIONS [mm]
# remove the lesion identification based on the distance between needles, too much variation for accurate identification
# put an absurd value for DISTANCE_BETWEEN_LESIONS
needle_type = 'IRE'
lesion = patient.findLesion(lesionlocation=tp_planning, DISTANCE_BETWEEN_LESIONS=3)
lesion = patient.findLesion(lesionlocation=tp_planning, DISTANCE_BETWEEN_LESIONS=10000)
if lesion is None:
lesion = patient.addNewLesion(tp_planning, time_intervention)
children_trajectories = xmlTrajectory
IV_parseNeedles(children_trajectories, lesion, needle_type,
ct_series, xml_filepath, time_intervention, cas_version)

else:
# assuming 'EG_ATOMIC_TRAJECTORY' stands for MWA type of needle
needle_type = "MWA"
# drop the lesion identification for MWA. multiple needles might be
# no clear consensus for minimal distance between lesions and no info in the log version <=2.9
lesion = patient.findLesion(lesionlocation=tp_planning, DISTANCE_BETWEEN_LESIONS=3)
if lesion is None:
lesion = patient.addNewLesion(tp_planning, time_intervention)
children_trajectories = xmlTrajectory
IV_parseNeedles(children_trajectories, lesion, needle_type,
ct_series, xml_filepath, time_intervention, cas_version)


def II_parseTrajectories(xmlobj):
Expand Down

0 comments on commit 7cc19fc

Please sign in to comment.