Skip to content

Commit

Permalink
Remove kludgy support for older versions of pydicom and dcmstack
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Apr 11, 2023
1 parent 591d1a9 commit e9252c1
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 51 deletions.
2 changes: 1 addition & 1 deletion heudiconv/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import warnings

import numpy as np
import pydicom as dcm

from . import __version__, dicoms
from .external.pydicom import dcm
from .parser import find_files
from .utils import (
create_file_if_missing,
Expand Down
5 changes: 3 additions & 2 deletions heudiconv/dicoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from typing import List, Optional
import warnings

from .external.pydicom import dcm
import pydicom as dcm

from .utils import SeqInfo, get_typed_attr, load_json, set_readonly

with warnings.catch_warnings():
Expand Down Expand Up @@ -505,9 +506,9 @@ def embed_dicom_and_nifti_metadata(dcmfiles, niftifile, infofile, bids_info):
import json
import os.path

import dcmstack as ds
import nibabel as nb

from heudiconv.external.dcmstack import ds
from heudiconv.utils import save_json

stack = ds.parse_and_stack(dcmfiles, force=True).values()
Expand Down
31 changes: 0 additions & 31 deletions heudiconv/external/dcmstack.py

This file was deleted.

13 changes: 0 additions & 13 deletions heudiconv/external/pydicom.py

This file was deleted.

2 changes: 1 addition & 1 deletion heudiconv/heuristics/multires_7Tbold.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def filter_dicom(dcmdata):
def extract_moco_params(basename, _outypes, dicoms):
if "_rec-dico" not in basename:
return
from dicom import read_file as dcm_read
from pydicom import read_file as dcm_read

# get acquisition time for all dicoms
dcm_times = [
Expand Down
2 changes: 1 addition & 1 deletion heudiconv/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"filelock>=3.0.12",
"nibabel",
"nipype >=1.2.3",
"pydicom",
"pydicom >= 1.0.0",
]

TESTS_REQUIRES = [
Expand Down
2 changes: 1 addition & 1 deletion heudiconv/tests/test_dicoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import os.path as op

import pydicom as dcm
import pytest

from heudiconv.cli.run import main as runner
Expand All @@ -15,7 +16,6 @@
group_dicoms_into_seqinfos,
parse_private_csa_header,
)
from heudiconv.external.pydicom import dcm

from .utils import TESTS_DATA_PATH, assert_cwd_unchanged

Expand Down
2 changes: 1 addition & 1 deletion heudiconv/tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import os.path as op
import re

import pydicom as dcm
import pytest

from heudiconv.cli.run import main as runner
from heudiconv.external.pydicom import dcm
from heudiconv.utils import load_json

# testing utilities
Expand Down

0 comments on commit e9252c1

Please sign in to comment.