Method to create the many temporary images for reading.
(tmp_path, img_extension, img_type)
| 25 | |
| 26 | |
| 27 | def create_data(tmp_path, img_extension, img_type): |
| 28 | """Method to create the many temporary images for reading.""" |
| 29 | n = 64 |
| 30 | s = 128 |
| 31 | t = img_type |
| 32 | |
| 33 | files = [] |
| 34 | |
| 35 | for i in range(0, n): |
| 36 | img = sitk.GaussianSource(t, [s, s], mean=[256 * (i + 1)] * 2) |
| 37 | fname = tmp_path / f"g_{i}.{img_extension}" |
| 38 | files.append(str(fname)) |
| 39 | sitk.WriteImage(img, files[-1]) |
| 40 | |
| 41 | return files |
| 42 | |
| 43 | |
| 44 | def threaded_read_test(files, expected_hash): |
no outgoing calls