generated from ArcanaFramework/fileformats-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from ArcanaFramework/syntax-updates
update to match changes in fileformats base
- Loading branch information
Showing
7 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 8 additions & 4 deletions
12
extras/fileformats/extras/medimage/tests/test_dicom_metadata.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
import pytest | ||
from fileformats.medimage import DicomSeries, DicomDir | ||
from conftest import OLD_MRTRIX_VERSION | ||
|
||
|
||
@pytest.mark.xfail(condition=OLD_MRTRIX_VERSION, reason="Old MRtrix version") | ||
def test_dicom_series_metadata(tmp_path): | ||
series = DicomSeries.sample(tmp_path) | ||
|
||
# Check series number is not a list | ||
assert not isinstance(series["SeriesNumber"], list) | ||
assert not isinstance(series.metadata["SeriesNumber"], list) | ||
# check the SOP Instance ID has been converted into a list | ||
assert isinstance(series["SOPInstanceUID"], list) | ||
assert isinstance(series.metadata["SOPInstanceUID"], list) | ||
|
||
|
||
@pytest.mark.xfail(condition=OLD_MRTRIX_VERSION, reason="Old MRtrix version") | ||
def test_dicom_dir_metadata(tmp_path): | ||
series = DicomDir.sample(tmp_path) | ||
|
||
# Check series number is not a list | ||
assert not isinstance(series["SeriesNumber"], list) | ||
assert not isinstance(series.metadata["SeriesNumber"], list) | ||
# check the SOP Instance ID has been converted into a list | ||
assert isinstance(series["SOPInstanceUID"], list) | ||
assert isinstance(series.metadata["SOPInstanceUID"], list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters