Skip to content
Snippets Groups Projects
Commit f5727915 authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Test covers labeling with default font

parent 9cb4cdd4
No related branches found
No related tags found
No related merge requests found
......@@ -4,20 +4,20 @@ from PIL import Image, ImageDraw, ImageFont
from model_server.base.process import rescale
def _get_font():
def _get_font(font_size=18):
return ImageFont.truetype(
font_manager.findfont(
font_manager.FontProperties(
family='sans-serif',
weight='bold'
)
)
),
size=font_size,
)
def draw_boxes_on_3d_image(roiset, draw_full_depth=False, **kwargs):
h, w, chroma, nz = roiset.acc_raw.shape
font_size = kwargs.get('font_size', 18)
linewidth = kwargs.get('linewidth', 4)
if ck := kwargs.get('channel'):
......
......@@ -365,6 +365,7 @@ class TestRoiSetMultichannelProducts(BaseTestRoiSetMonoProducts, unittest.TestCa
'test_multichannel_annotated_zstack',
expanded=True,
pad_to=256,
draw_label=True,
)
result = generate_file_accessor(where / file)
self.assertEqual(result.chroma, self.stack.chroma)
......@@ -377,6 +378,7 @@ class TestRoiSetMultichannelProducts(BaseTestRoiSetMonoProducts, unittest.TestCa
channel=3,
expanded=True,
pad_to=256,
draw_label=True,
)
result = generate_file_accessor(where / file)
self.assertEqual(result.hw, self.roiset.acc_raw.hw)
......
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