Skip to content

Commit 63ae04b

Browse files
committed
updating exercises that they work with the extension
1 parent aef088f commit 63ae04b

File tree

2 files changed

+37
-35
lines changed

2 files changed

+37
-35
lines changed

notebooks/basic_interfaces.ipynb

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,10 @@
571571
},
572572
{
573573
"cell_type": "markdown",
574-
"metadata": {},
574+
"metadata": {
575+
"solution2": "hidden",
576+
"solution2_first": true
577+
},
575578
"source": [
576579
"#### Exercise 1a\n",
577580
"Import `IsotropicSmooth` from `nipype.interfaces.fsl` and find the `FSL` command that is being run. What are the mandatory inputs for this interface?"
@@ -580,7 +583,9 @@
580583
{
581584
"cell_type": "code",
582585
"execution_count": null,
583-
"metadata": {},
586+
"metadata": {
587+
"solution2": "hidden"
588+
},
584589
"outputs": [],
585590
"source": [
586591
"from nipype.interfaces.fsl import IsotropicSmooth\n",
@@ -591,16 +596,21 @@
591596
},
592597
{
593598
"cell_type": "markdown",
594-
"metadata": {},
599+
"metadata": {
600+
"solution2": "hidden",
601+
"solution2_first": true
602+
},
595603
"source": [
596604
"#### Exercise 1b\n",
597-
"Run the `IsotropicSmooth` for `/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz` file with a smoothing kernel 4 (TODO):"
605+
"Run the `IsotropicSmooth` for `/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz` file with a smoothing kernel 4mm:"
598606
]
599607
},
600608
{
601609
"cell_type": "code",
602610
"execution_count": null,
603-
"metadata": {},
611+
"metadata": {
612+
"solution2": "hidden"
613+
},
604614
"outputs": [],
605615
"source": [
606616
"smoothing = IsotropicSmooth()\n",
@@ -612,7 +622,10 @@
612622
},
613623
{
614624
"cell_type": "markdown",
615-
"metadata": {},
625+
"metadata": {
626+
"solution2": "hidden",
627+
"solution2_first": true
628+
},
616629
"source": [
617630
"#### Exercise 1c\n",
618631
"Plot the output of your interface."
@@ -621,7 +634,9 @@
621634
{
622635
"cell_type": "code",
623636
"execution_count": null,
624-
"metadata": {},
637+
"metadata": {
638+
"solution2": "hidden"
639+
},
625640
"outputs": [],
626641
"source": [
627642
"# we will be using plot_anat from nilearn package\n",
@@ -630,13 +645,6 @@
630645
"plot_anat('/output/T1w_nipype_smooth.nii.gz', title='after smoothing',\n",
631646
" display_mode='ortho', dim=-1, draw_cross=False, annotate=False)"
632647
]
633-
},
634-
{
635-
"cell_type": "code",
636-
"execution_count": null,
637-
"metadata": {},
638-
"outputs": [],
639-
"source": []
640648
}
641649
],
642650
"metadata": {

notebooks/basic_nodes.ipynb

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@
207207
},
208208
{
209209
"cell_type": "markdown",
210-
"metadata": {},
210+
"metadata": {
211+
"solution2": "hidden",
212+
"solution2_first": true
213+
},
211214
"source": [
212215
"#### Exercise 1a\n",
213216
"Define a `Node` for `IsotropicSmooth` (from `fsl`). Run the node for T1 image for one of the subjects."
@@ -216,7 +219,9 @@
216219
{
217220
"cell_type": "code",
218221
"execution_count": null,
219-
"metadata": {},
222+
"metadata": {
223+
"solution2": "hidden"
224+
},
220225
"outputs": [],
221226
"source": [
222227
"# Import the Node module\n",
@@ -234,25 +239,21 @@
234239
},
235240
{
236241
"cell_type": "markdown",
237-
"metadata": {},
242+
"metadata": {
243+
"solution2": "hidden",
244+
"solution2_first": true
245+
},
238246
"source": [
239-
"#### Exercise 2a\n",
247+
"#### Exercise 1b\n",
240248
"Plot the original image and the image after smoothing."
241249
]
242250
},
243251
{
244252
"cell_type": "code",
245253
"execution_count": null,
246-
"metadata": {},
247-
"outputs": [],
248-
"source": [
249-
"smooth_res.outputs.out_file"
250-
]
251-
},
252-
{
253-
"cell_type": "code",
254-
"execution_count": null,
255-
"metadata": {},
254+
"metadata": {
255+
"solution2": "hidden"
256+
},
256257
"outputs": [],
257258
"source": [
258259
"%pylab inline\n",
@@ -262,13 +263,6 @@
262263
"plot_anat(smooth_res.outputs.out_file, title='smooth output', cut_coords=(10,10,10),\n",
263264
" display_mode='ortho',draw_cross=False, annotate=False)"
264265
]
265-
},
266-
{
267-
"cell_type": "code",
268-
"execution_count": null,
269-
"metadata": {},
270-
"outputs": [],
271-
"source": []
272266
}
273267
],
274268
"metadata": {

0 commit comments

Comments
 (0)