More volume voxels are being optimized than is of interest to us. We would like to create a mask that can be applied to the gradient, so that only a desired subset of the voxels will be optimized.
Run run_recon.py with the function recon_voxel.py. Since the volume size is small, it is visually evident which voxels are being updated each iteration.
Tasks
[x] When raytracing, retrieve the voxel indices from the dictionary class instance attribute vox_indices_by_mla_idx.
[x] Collect the voxels traced through into one place, removing redundancies. This could be a set, list, or mask.
[ ] Compute a filtered version of vox_indices_by_mla_idx. This can be done by adjusting the BirefringentRaytraceLFM class instance method store_shifted_vox_indices(). Alternatively, and likely preferably, the filtering can be performed after the dictionary is populated. To filter based on a retardance image, we can use the method _form_mask_from_nonzero_pixels_dict or directly the dictionary attribute nonzero_pixels_dict.
[x] Create a mask of shape optical_info['volume_shape'] containing the set of voxels that were intersected by rays.
Description
More volume voxels are being optimized than is of interest to us. We would like to create a mask that can be applied to the gradient, so that only a desired subset of the voxels will be optimized.
Files
To Reproduce
Run run_recon.py with the function
recon_voxel.py
. Since the volume size is small, it is visually evident which voxels are being updated each iteration.Tasks
vox_indices_by_mla_idx
.vox_indices_by_mla_idx
. This can be done by adjusting the BirefringentRaytraceLFM class instance methodstore_shifted_vox_indices()
. Alternatively, and likely preferably, the filtering can be performed after the dictionary is populated. To filter based on a retardance image, we can use the method_form_mask_from_nonzero_pixels_dict
or directly the dictionary attributenonzero_pixels_dict
.optical_info['volume_shape']
containing the set of voxels that were intersected by rays.