Skip to content
Snippets Groups Projects
Commit 84ae24d2 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Floating point formatting on OverlayInfoPanel

parent aae8519d
No related branches found
No related tags found
No related merge requests found
......@@ -218,8 +218,8 @@ class OverlayInfoPanel(fslpanel.FSLEyesPanel):
pixdim = hdr['pixdim'][i + 1]
if i < 3: pixdim = '{} {}'.format(pixdim, voxUnits)
elif i == 3: pixdim = '{} {}'.format(pixdim, timeUnits)
if i < 3: pixdim = '{:0.4g} {}'.format(pixdim, voxUnits)
elif i == 3: pixdim = '{:0.4g} {}'.format(pixdim, timeUnits)
info.addInfo(
strings.nifti['pixdim{}'.format(i + 1)],
......@@ -356,7 +356,7 @@ class OverlayInfoPanel(fslpanel.FSLEyesPanel):
lines.append('<tr>')
for coli in range(array.shape[1]):
lines.append('<td>{}</td>'.format(array[rowi, coli]))
lines.append('<td>{:0.4g}</td>'.format(array[rowi, coli]))
lines.append('</tr>')
return ''.join(lines)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment