From 7bde740a3acbfd0884fb70d3d752bab4b632009b Mon Sep 17 00:00:00 2001 From: eigenvivek Date: Sun, 13 Aug 2023 21:36:14 -0400 Subject: [PATCH] Fix tests --- notebooks/index.ipynb | 4 ++-- notebooks/tutorials/.notest | 0 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 notebooks/tutorials/.notest diff --git a/notebooks/index.ipynb b/notebooks/index.ipynb index c4fd84164..7d6178f78 100644 --- a/notebooks/index.ipynb +++ b/notebooks/index.ipynb @@ -117,7 +117,7 @@ "\n", "# Read in the volume and get the isocenter\n", "volume, spacing = load_example_ct()\n", - "translations = torch.tensor([[bx, by, bz]], device=device)\n", + "bx, by, bz = torch.tensor(volume.shape) * torch.tensor(spacing) / 2\n", "\n", "# Initialize the DRR module for generating synthetic X-rays\n", "device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n", @@ -131,7 +131,7 @@ "\n", "# Set the camera pose with rotations (yaw, pitch, roll) and translations (x, y, z)\n", "rotations = torch.tensor([[torch.pi, 0.0, torch.pi / 2]], device=device)\n", - "bx, by, bz = torch.tensor(volume.shape) * torch.tensor(spacing) / 2\n", + "translations = torch.tensor([[bx, by, bz]], device=device)\n", "\n", "# Make the DRR\n", "img = drr(rotations, translations)\n", diff --git a/notebooks/tutorials/.notest b/notebooks/tutorials/.notest new file mode 100644 index 000000000..e69de29bb