def show_compositions(self, report): # f_ba = report.figure() n = len(self.dds.actions) f_ab_norm = report.figure(cols=n, caption='Norm of AB') f_ab_phase = report.figure(cols=n, caption='Phase of AB') f_ab_info = report.figure(cols=n, caption='Certainty of AB') for a, b in iterate_indices((n, n)): A = self.dds.actions[a] B = self.dds.actions[b] AB = DiffeoAction.compose(A, B) norm_rgb = diffeo_to_rgb_norm(AB.diffeo.d) phase_rgb = diffeo_to_rgb_angle(AB.diffeo.d) info_rgb = scalaruncertainty2rgb(AB.diffeo.variance) label = '%s-%s' % (A.label, B.label) caption = '%s, %s' % (A.label, B.label) f_ab_norm.data_rgb('%s_norm' % label, norm_rgb, caption=caption) f_ab_phase.data_rgb('%s_phase' % label, phase_rgb, caption=caption) f_ab_info.data_rgb('%s_info' % label, info_rgb, caption=caption)
def get_rgb_uncertain(self): """ Returns an RGB representation of the uncertainty of the image. """ return scalaruncertainty2rgb(self.scalar_uncertainty)