Skip to content

Commit

Permalink
Display more dicom metadata in visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas1312 committed Apr 24, 2020
1 parent ebcc8d2 commit 5c1c98b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions pylidc/Annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,13 +830,16 @@ def visualize_in_scan(self, verbose=True):
ax_image.axis('off')

# Add the scan info table
ax_scan_info = fig.add_axes([0.1, 0.8, 0.3, 0.1])
ax_scan_info = fig.add_axes([0.1, 0.76, 0.3, 0.15])
ax_scan_info.set_facecolor('w')
scan_info_table = ax_scan_info.table(
cellText=[
['Patient ID:', self.scan.patient_id],
['Slice thickness:', '%.3f mm' % self.scan.slice_thickness],
['Pixel spacing:', '%.3f mm'%self.scan.pixel_spacing]
['Pixel spacing:', '%.3f mm'%self.scan.pixel_spacing],
['Manufacturer:', images[current_slice].Manufacturer],
['Model name:', images[current_slice].ManufacturerModelName],
['Convolution kernel:', images[current_slice].ConvolutionKernel],
],
loc='center', cellLoc='left'
)
Expand Down
7 changes: 5 additions & 2 deletions pylidc/Scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,15 @@ def visualize(self, annotation_groups=None):
a.set_visible(False) # flipped on/off by `update` function.
arrows.append(a)

ax_scan_info = fig.add_axes([0.1, 0.8, 0.3, 0.1]) # l,b,w,h
ax_scan_info = fig.add_axes([0.1, 0.7, 0.3, 0.15]) # l,b,w,h
ax_scan_info.set_facecolor('w')
scan_info_table = ax_scan_info.table(cellText=[
['Patient ID:', self.patient_id],
['Slice thickness:', '%.3f mm' % self.slice_thickness],
['Pixel spacing:', '%.3f mm' % self.pixel_spacing]
['Pixel spacing:', '%.3f mm' % self.pixel_spacing],
['Manufacturer:', images[current_slice].Manufacturer],
['Model name:', images[current_slice].ManufacturerModelName],
['Convolution kernel:', images[current_slice].ConvolutionKernel],
],
loc='center', cellLoc='left'
)
Expand Down

0 comments on commit 5c1c98b

Please sign in to comment.