Skip to content

Commit 464e468

Browse files
committed
add complex part to ImageType for use in heuristics, it is done in dcm2niix when converting
1 parent 4304276 commit 464e468

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

heudiconv/dicoms.py

+9
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ def create_seqinfo(mw: dw.Wrapper, series_files: list[str], series_id: str) -> S
7676
else:
7777
sequence_name = ""
7878

79+
# GE data
80+
# see https://github.com/rordenlab/dcm2niix/tree/master/GE#complex-image-component
81+
if dcminfo.get([0x43, 0x102F]):
82+
GE_CPLX_CODING = ["PHASE", "MAGNITUDE", "REAL", "IMAGINARY"]
83+
cplx_idx = int(dcminfo.get([0x43, 0x102F]).value)
84+
part = GE_CPLX_CODING[cplx_idx]
85+
if part not in image_type:
86+
image_type = image_type + (part,)
87+
7988
# initialized in `group_dicoms_to_seqinfos`
8089
global total_files
8190
total_files += len(series_files)

0 commit comments

Comments
 (0)