Skip to content

Commit

Permalink
Initialize calibration matrix with (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenvivek authored Jul 10, 2024
1 parent 24a85e5 commit 9af7c19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions diffdrr/drr.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def __init__(

# Initialize the volume and world geometry
self.subject = subject
self.volume = subject.volume.data.squeeze()
self.register_buffer(
"_affine",
torch.as_tensor(subject.volume.affine, dtype=torch.float32).unsqueeze(0),
Expand Down Expand Up @@ -197,7 +196,7 @@ def set_intrinsics(
n_subsample=self.detector.n_subsample,
reverse_x_axis=self.detector.reverse_x_axis,
reorient=self.subject.reorient,
).to(self.volume)
).to(self.density)

# %% ../notebooks/api/00_drr.ipynb 12
@patch
Expand Down
3 changes: 1 addition & 2 deletions notebooks/api/00_drr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@
"\n",
" # Initialize the volume and world geometry\n",
" self.subject = subject\n",
" self.volume = subject.volume.data.squeeze()\n",
" self.register_buffer(\n",
" \"_affine\",\n",
" torch.as_tensor(subject.volume.affine, dtype=torch.float32).unsqueeze(0),\n",
Expand Down Expand Up @@ -324,7 +323,7 @@
" n_subsample=self.detector.n_subsample,\n",
" reverse_x_axis=self.detector.reverse_x_axis,\n",
" reorient=self.subject.reorient,\n",
" ).to(self.volume)"
" ).to(self.density)"
]
},
{
Expand Down

0 comments on commit 9af7c19

Please sign in to comment.