diff --git a/simpa/utils/libraries/structure_library/ParallelepipedStructure.py b/simpa/utils/libraries/structure_library/ParallelepipedStructure.py index a84fd49c..05c90220 100644 --- a/simpa/utils/libraries/structure_library/ParallelepipedStructure.py +++ b/simpa/utils/libraries/structure_library/ParallelepipedStructure.py @@ -72,7 +72,7 @@ def get_enclosed_indices(self): 1/torch.linalg.norm(y_edge_voxels), 1/torch.linalg.norm(z_edge_voxels)], device=self.torch_device) - filled_mask_bool = (0 <= result) & (result <= 1 - norm_vector) + filled_mask_bool = (0 <= result) & (result + norm_vector <= 1) volume_fractions = torch.zeros(tuple(self.volume_dimensions_voxels), dtype=torch.float, device=self.torch_device)