mirror of
https://github.com/13hannes11/situr.git
synced 2024-09-03 20:50:58 +02:00
convert images to uint8 for visualisation
This commit is contained in:
@@ -143,7 +143,8 @@ class SituImage:
|
|||||||
Returns:
|
Returns:
|
||||||
Image: The image of the specified focus level and channel
|
Image: The image of the specified focus level and channel
|
||||||
"""
|
"""
|
||||||
img = Image.fromarray(self.get_data()[channel, focus_level, :, :])
|
img = Image.fromarray(
|
||||||
|
self.get_data()[channel, focus_level, :, :].astype(np.uint8))
|
||||||
img.show()
|
img.show()
|
||||||
return img
|
return img
|
||||||
|
|
||||||
@@ -172,7 +173,8 @@ class SituImage:
|
|||||||
peaks = self.get_channel_peaks(
|
peaks = self.get_channel_peaks(
|
||||||
channel, focus_level)
|
channel, focus_level)
|
||||||
|
|
||||||
img = Image.fromarray(self.get_data()[channel, focus_level, :, :])
|
img = Image.fromarray(
|
||||||
|
self.get_data()[channel, focus_level, :, :].astype(np.uint8))
|
||||||
draw = ImageDraw.Draw(img)
|
draw = ImageDraw.Draw(img)
|
||||||
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 - 5, y - 5, x + 5, y + 5),
|
||||||
|
|||||||
Reference in New Issue
Block a user