Skip to content

Commit 90a640b

Browse files
authored
Update README.md
1 parent 565c194 commit 90a640b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,29 @@ pip install /path/to/pydra-dcm2niix/
1616
```
1717
pip install -e /path/to/pydra-dcm2niix/[dev]
1818
```
19+
20+
## Basic Use
21+
22+
To run the `dcm2niix` task
23+
24+
```
25+
from pydra.tasks.dcm2niix import Dcm2Niix
26+
27+
task = Dcm2Niix(in_dir='/path/to/dicom/dir', out_dir='/path/to/create/nifti/output')
28+
result = task()
29+
```
30+
31+
However, the converter task interface will typically be used as the first step within larger Pydra workflows
32+
33+
```
34+
from pydra import Workflow
35+
from pydra.tasks.dcm2niix import Dcm2Niix
36+
37+
my_workflow = Workflow(name='my_workflow')
38+
39+
my_workflow.add(
40+
Dcm2Niix(name='converter', in_dir='/path/to/dicom/dir', out_dir='/path/to/create/nifti/output'))
41+
my_workflow.add(...)
42+
43+
my_workflow()
44+
```

0 commit comments

Comments
 (0)