Skip to content

Commit fe724de

Browse files
committed
doc(comments): outdated comment in test; .IMA is Siemens dcm ext
1 parent 910c5d8 commit fe724de

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

deid/tests/test_clean.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def test_get_clean_name(self):
251251
) # defaults: extension="dcm", prefix="clean-"
252252
self.assertEqual(new_name, os.path.join("abc", "clean-XYZ.dcm"))
253253

254-
# note IMA not removed -- unusual dicom extension not implicitly handled
254+
# note IMA not removed -- Siemens dicom extension not implicitly handled
255255
client.dicom_file = "XYZ.IMA"
256256
new_name = client._get_clean_name(output_folder="abc", extension="png")
257257
self.assertEqual(new_name, os.path.join("abc", "clean-XYZ.IMA.png"))

deid/tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def test_deidmain_clean_pixels(self):
6464
# Confirm input data has value that will be scrubbed.
6565
indcm = utils.dcmread(self.tmpdir + "/example.dicom")
6666
self.assertEqual(indcm.pixel_array.shape, (456, 510, 3))
67-
censor_area = indcm.pixel_array[0:250, 0:100, :] # y,x,z
67+
# index is y,x,z for censor box coordinates from deid.cfg below
68+
censor_area = indcm.pixel_array[0:250, 0:100, :]
6869
# all voxels in region to be scrubbed are valued. lucky us
6970
self.assertEqual(np.count_nonzero(censor_area != 0), 75000)
7071

@@ -88,7 +89,6 @@ def test_deidmain_clean_pixels(self):
8889
# Confirm we changed pixel data
8990
self.assertTrue(np.any(indcm.pixel_array != outfile.pixel_array))
9091
# Confirm censor area is all zeros
91-
# 30126 but expect 75000
9292
zero_cnt = np.count_nonzero(outfile.pixel_array[0:250, 0:100, :] == 0)
9393
self.assertEqual(zero_cnt, 100 * 250 * 3) # 75000
9494

0 commit comments

Comments
 (0)