mirror of
https://github.com/13hannes11/situr.git
synced 2024-09-03 20:50:58 +02:00
improve peak visualisation as it's now drawn in colour with one dark and one bright colour
This commit is contained in:
@@ -174,10 +174,17 @@ class SituImage:
|
|||||||
channel, focus_level)
|
channel, focus_level)
|
||||||
|
|
||||||
img = Image.fromarray(
|
img = Image.fromarray(
|
||||||
self.get_data()[channel, focus_level, :, :].astype(np.uint8))
|
self.get_data()[channel, focus_level, :, :].astype(np.uint8)).convert('RGB')
|
||||||
draw = ImageDraw.Draw(img)
|
draw = ImageDraw.Draw(img)
|
||||||
|
|
||||||
|
width = 3
|
||||||
|
inner_radius = 5
|
||||||
|
outer_radius = inner_radius + width
|
||||||
|
|
||||||
for x, y in zip(peaks[:, 0], peaks[:, 1]):
|
for x, y in zip(peaks[:, 0], peaks[:, 1]):
|
||||||
draw.ellipse((x - 5, y - 5, x + 5, y + 5),
|
draw.ellipse((x - inner_radius, y - inner_radius, x + inner_radius, y + inner_radius),
|
||||||
outline='white', width=3)
|
outline='navy', width=width)
|
||||||
|
draw.ellipse((x - outer_radius, y - outer_radius, x + outer_radius, y + outer_radius),
|
||||||
|
outline='yellow', width=width)
|
||||||
img.show()
|
img.show()
|
||||||
return img
|
return img
|
||||||
|
|||||||
Reference in New Issue
Block a user