BioImager  3.9.1
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
microscope.testsuite.test_devices.TestImageGenerator Class Reference
Inheritance diagram for microscope.testsuite.test_devices.TestImageGenerator:

Public Member Functions

def test_non_square_patterns_shape (self)
 

Detailed Description

Definition at line 424 of file test_devices.py.

Member Function Documentation

◆ test_non_square_patterns_shape()

def microscope.testsuite.test_devices.TestImageGenerator.test_non_square_patterns_shape (   self)

Definition at line 425 of file test_devices.py.

425 def test_non_square_patterns_shape(self):
426 # TODO: we should also be testing this via the camera but the
427 # TestCamera is only square. In the mean time, we only test
428 # directly the _ImageGenerator.
429 width = 16
430 height = 32
431 generator = simulators._ImageGenerator()
432 patterns = list(generator.get_methods())
433 for i, pattern in enumerate(patterns):
434 with self.subTest(pattern):
435 generator.set_method(i)
436 array = generator.get_image(width, height, 0, 255)
437 # In matplotlib, an M-wide by N-tall image has M columns
438 # and N rows, so a shape of (N, M)
439 self.assertEqual(array.shape, (height, width))
440
441

The documentation for this class was generated from the following file: