Skip to content

Commit 5f6c79f

Browse files
committed
Add slice_axis to SlidingWindowInferer
Signed-off-by: Suraj <b.pai@maastrichtuniversity.nl>
1 parent be74b60 commit 5f6c79f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/2d_inference_3d_volume.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"output_type": "stream",
4242
"text": [
4343
"Requirement already satisfied: monai in /home/suraj/miniconda3/envs/monai/lib/python3.7/site-packages (0.8.0)\n",
44-
"Requirement already satisfied: torch>=1.6 in /home/suraj/miniconda3/envs/monai/lib/python3.7/site-packages (from monai) (1.10.0)\n",
4544
"Requirement already satisfied: numpy>=1.17 in /home/suraj/miniconda3/envs/monai/lib/python3.7/site-packages (from monai) (1.21.4)\n",
45+
"Requirement already satisfied: torch>=1.6 in /home/suraj/miniconda3/envs/monai/lib/python3.7/site-packages (from monai) (1.10.0)\n",
4646
"Requirement already satisfied: typing-extensions in /home/suraj/miniconda3/envs/monai/lib/python3.7/site-packages (from torch>=1.6->monai) (4.0.1)\n"
4747
]
4848
}
@@ -133,7 +133,7 @@
133133
},
134134
{
135135
"cell_type": "code",
136-
"execution_count": 6,
136+
"execution_count": 3,
137137
"id": "85b15305",
138138
"metadata": {},
139139
"outputs": [
@@ -175,7 +175,7 @@
175175
"\n",
176176
"# Create an instance of YourSlidingWindowInferer with roi_size as the 64x256 (DxW) and sliding over H axis\n",
177177
"coronal_inferer = YourSlidingWindowInferer(roi_size=(64, 256),\n",
178-
" sw_batch_size=1, slice_axis=0, # Slice axis is added here\n",
178+
" sw_batch_size=1, slice_axis=1, # Slice axis is added here\n",
179179
" cval=-1)\n",
180180
"\n",
181181
"output = coronal_inferer(input_volume, net)\n",
@@ -187,7 +187,7 @@
187187
{
188188
"cell_type": "code",
189189
"execution_count": null,
190-
"id": "2c6c0028",
190+
"id": "454c353f",
191191
"metadata": {},
192192
"outputs": [],
193193
"source": []

0 commit comments

Comments
 (0)