Skip to content

Commit a699e4d

Browse files
committed
TMP: just a demonstration on how custom_seqinfo could/should be used
1 parent 44124bd commit a699e4d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

heudiconv/heuristics/convertall.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from __future__ import annotations
22

3-
from typing import Optional
3+
from typing import Any, Optional
44

5+
from heudiconv.dicoms import dw
56
from heudiconv.utils import SeqInfo
67

78

@@ -15,6 +16,14 @@ def create_key(
1516
return (template, outtype, annotation_classes)
1617

1718

19+
def custom_seqinfo(wrapper: dw.Wrapper, series_files: list[str], **kw: Any) -> tuple[str, str]:
20+
# Just a dummy demo for what custom_seqinfo could get/do
21+
# for already loaded DICOM data, and including storing/returning
22+
# the sample series file as was requested
23+
# in https://github.com/nipy/heudiconv/pull/333
24+
return wrapper.affine, series_files[0]
25+
26+
1827
def infotodict(
1928
seqinfo: list[SeqInfo],
2029
) -> dict[tuple[str, tuple[str, ...], None], list[str]]:

0 commit comments

Comments
 (0)