Closed gschlafly closed 9 months ago
The choice to use a restricted set of the volume shape was made it commit 3c3c6c94c6575851501c68c1a9f3a2bf265df7fd.
Actually, the same volume set was used in https://github.com/PolarizedLightFieldMicroscopy/GeoBirT/commit/3c3c6c94c6575851501c68c1a9f3a2bf265df7fd. Only the variable name was changed to indicate that the volume shape being used to ray trace through the volume was different than that of the original volume.
Applying the Siddon algorithm to self.vol_shape_restricted
instead of the entire volume is done so that only the object directly under the MLA is captured in the model. Since only one microlens was used and the supersampling was one, only one voxel width fits under the MLA. This is why Siddon information is collected for only the voxels $(1,0,0)$, $(2,0,0)$, and $(3,0,0)$.
Description
When
compute_ray_collisions()
is called, the input volume shape should be large enough so that all the relevant collision indices are extracted. https://github.com/PolarizedLightFieldMicroscopy/GeoBirT/blob/59cb8904bdfd36be12725dc3013950b81ff8b461/VolumeRaytraceLFM/abstract_classes.py#L484-L488With one microlens and a volume of shape $(3,7,7)$, the only indices that are said to have collisions are $(1,0,0)$, $(2,0,0)$, and $(3,0,0)$. However, the rays definitely pass through voxels where $y\neq0$ or $z\neq0$.
When using the complete volume shape to compute the collision indices, voxels where $y\neq0$ or $z\neq0$ are collected. Although, some tests fail due to IndexError.
Screenshots
Files
To Reproduce
Replace _abstractclasses.py#L484-L488 with the following:
and then run the test
test_all.py::test_forward_projection_different_volumes[single_voxel]
.