def read_patch(data_wrapper, pos_index, z_index, split_k, patch_index):
    """
    Crop a square region out of larger image for netwrok training
    :param data_wrapper:
    :param pos_index: index of XY position
    :param z_index: z slice index
    :param split_k: number of crops along each dimension
    :param patch_index: index of the crop
    :return: 2d numpy array of floats corresponding to image patch
    """

    return data_wrapper.read_prediction_image(position_index=pos_index, z_index=z_index,
                                              patch_index=patch_index, split_k=split_k)