Skip to content

Commit

Permalink
space before colons
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Aug 20, 2024
1 parent 7e6f3e0 commit 19ee216
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions markimg/markimg.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,71 +477,71 @@ def run(self, options):
x_pos = x_pos + line_gap
display_text = field + ": " + str(info[field])
d_info[field] = info[field]
plt.text(x_pos, y_pos, display_text, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, display_text, color='white', fontsize=options.textSize, rotation=90)

# Print some blank lines
for i in range(0, 3):
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, '', color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, '', color='white', fontsize=options.textSize, rotation=90)

d_femur = {}
# Print specific details about the image
rightFemurInfo = 'Right femur : ' + str(d_lengths['Right femur']) + f' {unit}'
d_femur['Right femur'] = str(d_lengths['Right femur']) + f' {unit}'
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, rightFemurInfo, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, rightFemurInfo, color='white', fontsize=options.textSize, rotation=90)

leftFemurInfo = 'Left femur : ' + str(d_lengths['Left femur']) + f' {unit}'
d_femur['Left femur'] = str(d_lengths['Left femur']) + f' {unit}'
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, leftFemurInfo, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, leftFemurInfo, color='white', fontsize=options.textSize, rotation=90)

femurDiffInfo = str(self.getDiff(d_lengths['Right femur'], d_lengths['Left femur'])) + f' {unit}, ' + \
self.compareLength(d_lengths['Left femur'], d_lengths['Right femur'])

femurDiffText = 'Difference : ' + femurDiffInfo
d_femur['Difference'] = femurDiffInfo
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, femurDiffText, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, femurDiffText, color='white', fontsize=options.textSize, rotation=90)

# blank line
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, '', color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, '', color='white', fontsize=options.textSize, rotation=90)

d_tibia = {}
rightTibiaInfo = 'Right tibia : ' + str(d_lengths['Right tibia']) + f' {unit}'
d_tibia['Right tibia'] = str(d_lengths['Right tibia']) + f' {unit}'
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, rightTibiaInfo, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, rightTibiaInfo, color='white', fontsize=options.textSize, rotation=90)

leftTibiaInfo = 'Left tibia : ' + str(d_lengths['Left tibia']) + f' {unit}'
d_tibia['Left tibia'] = str(d_lengths['Left tibia']) + f' {unit}'
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, leftTibiaInfo, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, leftTibiaInfo, color='white', fontsize=options.textSize, rotation=90)

tibiaDiffInfo = str(self.getDiff(d_lengths['Right tibia'], d_lengths['Left tibia'])) + f' {unit}, ' + \
self.compareLength(d_lengths['Left tibia'], d_lengths['Right tibia'])

tibaiDiffText = 'Difference : ' + tibiaDiffInfo
d_tibia['Difference'] = tibiaDiffInfo
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, tibaiDiffText, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, tibaiDiffText, color='white', fontsize=options.textSize, rotation=90)

x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, '', color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, '', color='white', fontsize=options.textSize, rotation=90)

d_total = {}
totalRightInfo = 'Total right : ' + str(
self.getSum(d_lengths['Right femur'], d_lengths['Right tibia'])) + f' {unit}'
d_total['Total right'] = str(self.getSum(d_lengths['Right femur'], d_lengths['Right tibia'])) + f' {unit}'
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, totalRightInfo, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, totalRightInfo, color='white', fontsize=options.textSize, rotation=90)

totalLeftInfo = 'Total left : ' + str(
self.getSum(d_lengths['Left femur'], d_lengths['Left tibia'])) + f' {unit}'
d_total['Total left'] = str(self.getSum(d_lengths['Left femur'], d_lengths['Left tibia'])) + f' {unit}'
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, totalLeftInfo, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, totalLeftInfo, color='white', fontsize=options.textSize, rotation=90)

totalDiff = self.getDiff(self.getSum(d_lengths['Left femur'], d_lengths['Left tibia']),
self.getSum(d_lengths['Right femur'], d_lengths['Right tibia']))
Expand All @@ -552,7 +552,7 @@ def run(self, options):
totalDiffText = 'Total difference : ' + totalDiffInfo
d_total['Difference'] = totalDiffInfo
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, totalDiffText, color='white', fontsize=options.textSize, rotation=90, wrap=True)
plt.text(x_pos, y_pos, totalDiffText, color='white', fontsize=options.textSize, rotation=90)

if warning_msg:
# Print some blank lines
Expand Down

0 comments on commit 19ee216

Please sign in to comment.