def apply(self, dataset, can_fit=False):
        """
        .. todo::

            WRITEME
        """
        w_rows, w_cols = self.window_shape

        arr = dataset.get_topological_view()

        try:
            axes = dataset.view_converter.axes
        except __HOLE__:
            reraise_as(NotImplementedError("I don't know how to tell what the "
                                           "axes of this kind of dataset "
                                           "are."))

        needs_transpose = not axes[1:3] == (0, 1)

        if needs_transpose:
            arr = numpy.transpose(arr,
                                  (axes.index('c'),
                                   axes.index(0),
                                   axes.index(1),
                                   axes.index('b')))

        r_off = (arr.shape[1] - w_rows) // 2
        c_off = (arr.shape[2] - w_cols) // 2
        new_arr = arr[:, r_off:r_off + w_rows, c_off:c_off + w_cols, :]

        if needs_transpose:
            index_map = tuple(('c', 0, 1, 'b').index(axis) for axis in axes)
            new_arr = numpy.transpose(new_arr, index_map)

        dataset.set_topological_view(new_arr, axes=axes)
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/preprocessing.py/CentralWindow.apply