Skip to content

Commit 76feb69

Browse files
committed
added additional comment to toymedianThreshold example
1 parent 8f1623c commit 76feb69

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

new-docs/source/tutorial/6-workflow.ipynb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,17 @@
482482
" @python.define\n",
483483
" def Median(mih: mrtrix3.ImageHeader) -> float:\n",
484484
" \"\"\"A bespoke function that reads the separate data file in the MRTrix3 image\n",
485-
" header format (i.e. .mih) and calculates the median value.\"\"\"\n",
485+
" header format (i.e. .mih) and calculates the median value.\n",
486+
"\n",
487+
" NB: We could use a MrStats task here, but this is just an example to show how\n",
488+
" to use a bespoke function in a workflow.\n",
489+
" \"\"\"\n",
486490
" dtype = MRTRIX2NUMPY_DTYPES[mih.metadata[\"datatype\"].strip()]\n",
487491
" data = np.frombuffer(Path.read_bytes(mih.data_file), dtype=dtype)\n",
488492
" return np.median(data)\n",
489493
"\n",
490494
" median = workflow.add(Median(mih=input_conversion.out_file))\n",
495+
"\n",
491496
" threshold = workflow.add(\n",
492497
" MrThreshold(in_file=in_image, out_file=\"binary.mif\", abs=median.out),\n",
493498
" environment=Docker(\"mrtrix3/mrtrix3\", tag=\"latest\"),\n",

0 commit comments

Comments
 (0)