MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / test_multi_dicom

Method test_multi_dicom

tests/transforms/test_load_imaged.py:133–140  ·  view source on GitHub ↗

multichannel dicom reading, saving to nifti, then load with itk or nibabel

(self)

Source from the content-addressed store, hash-verified

131 self._cmp(img_dir, (1, 16, 16, 4), "itkreader", "nibabelreader", output_name, ".nii.gz")
132
133 def test_multi_dicom(self):
134 """multichannel dicom reading, saving to nifti, then load with itk or nibabel"""
135
136 img_dir = ["tests/testing_data/CT_DICOM", "tests/testing_data/CT_DICOM"]
137 self._cmp(img_dir, (2, 16, 16, 4), "itkreader", "itkreader", "CT_DICOM/CT_DICOM_trans.nii.gz", ".nii.gz")
138 output_name = "CT_DICOM/CT_DICOM_trans.nii.gz"
139 self._cmp(img_dir, (2, 16, 16, 4), "nibabelreader", "itkreader", output_name, ".nii.gz")
140 self._cmp(img_dir, (2, 16, 16, 4), "itkreader", "nibabelreader", output_name, ".nii.gz")
141
142 def test_png(self):
143 """png reading with itk, saving to nifti, then load with itk or nibabel or PIL"""

Callers

nothing calls this directly

Calls 1

_cmpMethod · 0.95

Tested by

no test coverage detected