def METHOD_NAME(self, filename, **kwargs):
    """
    Write the image file to be compared.
    NOTE: Requires self._window to be a VTKWindowWidget or FigureWidget object.
    """
    window = kwargs.pop('window', self._window)
    window.onWrite(filename, **kwargs)