visualization
Utility functions to visualize and animate DRRs
plot_drr
plot_drr (img:torch.Tensor, title:Optional[str]=None, ticks:Optional[bool]=True, axs:Optional[matplotlib.axes._axes.Axes]=None)
Plot an image generated by a DRR module.
animate
animate (out:Union[str,pathlib.Path], df:pandas.core.frame.DataFrame, sdr:float, drr:diffdrr.drr.DRR, ground_truth:Optional[torch.Tensor]=None, verbose:bool=True, **kwargs)
Animate the optimization of a DRR.
Type | Default | Details | |
---|---|---|---|
out | str | pathlib.Path | Savepath | |
df | pandas.DataFrame | ||
sdr | float | ||
drr | DRR | ||
ground_truth | torch.Tensor | None | None | |
verbose | bool | True | |
kwargs |
df
is a pandas.DataFrame
with columns ["theta", "phi", "gamma", "bx", "by", "bz"]
. Each row in df
is an iteration of optimization with the updated values for that timestep.