Skip to content

Commit e3f411e

Browse files
authored
Update reconstruction tutorial with simpler API (#330)
1 parent de6b9aa commit e3f411e

File tree

3 files changed

+49
-62
lines changed

3 files changed

+49
-62
lines changed

diffdrr/drr.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ def forward(
160160
@patch
161161
def render(
162162
self: DRR,
163-
density: torch.tensor,
164-
source: torch.tensor,
165-
target: torch.tensor,
166-
mask_to_channels: bool,
163+
density: torch.tensor, # Volume from which to render DRRs
164+
source: torch.tensor, # World coordinates of X-ray source
165+
target: torch.tensor, # World coordinates of X-ray target
166+
mask_to_channels: bool = False, # If True, structures from the CT mask are rendered in separate channels
167167
**kwargs,
168168
):
169169
# Initialize the image with the length of each cast ray

notebooks/api/00_drr.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@
279279
"@patch\n",
280280
"def render(\n",
281281
" self: DRR,\n",
282-
" density: torch.tensor,\n",
283-
" source: torch.tensor,\n",
284-
" target: torch.tensor,\n",
285-
" mask_to_channels: bool,\n",
282+
" density: torch.tensor, # Volume from which to render DRRs\n",
283+
" source: torch.tensor, # World coordinates of X-ray source\n",
284+
" target: torch.tensor, # World coordinates of X-ray target\n",
285+
" mask_to_channels: bool = False, # If True, structures from the CT mask are rendered in separate channels\n",
286286
" **kwargs,\n",
287287
"):\n",
288288
" # Initialize the image with the length of each cast ray\n",

notebooks/tutorials/reconstruction.ipynb

Lines changed: 41 additions & 54 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)