code: def _generate_report(self):
          
          from niworkflows.viz.utils import plot_registration
          NIWORKFLOWS_LOG.info('Generating visual report')
  
          fixed_image_nii = load_img(self._fixed_image)
          moving_image_nii = load_img(self._moving_image)
          contour_nii = load_img(self._contour) if self._contour is not None else None
  
          if self._fixed_image_mask:
              fixed_image_nii = unmask(apply_mask(fixed_image_nii,
                                                  self._fixed_image_mask),
                                       self._fixed_image_mask)
              # since the moving image is already in the fixed image space we
              # should apply the same mask
              moving_image_nii = unmask(apply_mask(moving_image_nii,
                                                   self._fixed_image_mask),
                                        self._fixed_image_mask)
              mask_nii = load_img(self._fixed_image_mask)
          else:
              mask_nii = threshold_img(fixed_image_nii, 1e-3)
  
          n_cuts = 7
          if not self._fixed_image_mask and contour_nii:
              cuts = cuts_from_bbox(contour_nii, cuts=n_cuts)
          else:
              cuts = cuts_from_bbox(mask_nii, cuts=n_cuts)
  
          # Call composer
          compose_view(
              plot_registration(fixed_image_nii, 'fixed-image',
                                estimate_brightness=True,
                                cuts=cuts,
                                label=self._fixed_image_label,
                                contour=contour_nii,
                                compress=self.inputs.compress_report),
              plot_registration(moving_image_nii, 'moving-image',
                                estimate_brightness=True,
                                cuts=cuts,
                                label=self._moving_image_label,
                                contour=contour_nii,
                                compress=self.inputs.compress_report),
              out_file=self._out_report
          )
docs: Generates the visual report