Create a test directory with a DICOM file for testing.
(tmp_path)
| 22 | |
| 23 | @pytest.fixture |
| 24 | def test_data(tmp_path): |
| 25 | """Create a test directory with a DICOM file for testing.""" |
| 26 | img = sitk.Image([10, 10], sitk.sitkInt16) |
| 27 | test_dcm_file = tmp_path / "test.dcm" |
| 28 | sitk.WriteImage(img, test_dcm_file) |
| 29 | |
| 30 | # Return a dictionary with the test data |
| 31 | return {"test_dir": tmp_path, "test_dcm_file": test_dcm_file} |
| 32 | |
| 33 | def test_ProcessObject(): |
| 34 | sitk.ProcessObject_GlobalDefaultDebugOff() |