Skip to content

Commit

Permalink
add complex part to ImageType for use in heuristics, it is done in dc…
Browse files Browse the repository at this point in the history
…m2niix when converting
  • Loading branch information
bpinsard committed May 30, 2024
1 parent 4304276 commit 464e468
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions heudiconv/dicoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def create_seqinfo(mw: dw.Wrapper, series_files: list[str], series_id: str) -> S
else:
sequence_name = ""

# GE data
# see https://github.com/rordenlab/dcm2niix/tree/master/GE#complex-image-component
if dcminfo.get([0x43, 0x102F]):
GE_CPLX_CODING = ["PHASE", "MAGNITUDE", "REAL", "IMAGINARY"]
cplx_idx = int(dcminfo.get([0x43, 0x102F]).value)
part = GE_CPLX_CODING[cplx_idx]
if part not in image_type:
image_type = image_type + (part,)

# initialized in `group_dicoms_to_seqinfos`
global total_files
total_files += len(series_files)
Expand Down

0 comments on commit 464e468

Please sign in to comment.