def indices_to_batch(vol_data, start_indices, nb_slices_in_subvol, nb_slice_spacing):
    idx = start_indices[0]
    output_batch = np.expand_dims(vol_data[:, :, idx:(idx + nb_slices_in_subvol)], 0)
    input_batch = np.expand_dims(vol_data[:, :, idx:(idx + nb_slices_in_subvol):(nb_slice_spacing + 1)], 0)
    for idx in start_indices[1:]:
        out_sel = np.expand_dims(vol_data[:, :, idx:(idx + nb_slices_in_subvol)], 0)
        output_batch = np.vstack([output_batch, out_sel])
        input_batch = np.vstack([input_batch, np.expand_dims(vol_data[:, :, idx:(idx + nb_slices_in_subvol):(nb_slice_spacing + 1)], 0)])
    output_batch = np.reshape(output_batch, [batch_size, (- 1), output_batch.shape[(- 1)]])
    return (input_batch, output_batch)
def indices_to_batch(vol_data, start_indices, nb_slices_in_subvol, nb_slice_spacing):
    idx = start_indices[0]
    output_batch = np.expand_dims(vol_data[:, :, idx:(idx + nb_slices_in_subvol)], 0)
    input_batch = np.expand_dims(vol_data[:, :, idx:(idx + nb_slices_in_subvol):(nb_slice_spacing + 1)], 0)
    for idx in start_indices[1:]:
        out_sel = np.expand_dims(vol_data[:, :, idx:(idx + nb_slices_in_subvol)], 0)
        output_batch = np.vstack([output_batch, out_sel])
        input_batch = np.vstack([input_batch, np.expand_dims(vol_data[:, :, idx:(idx + nb_slices_in_subvol):(nb_slice_spacing + 1)], 0)])
    output_batch = np.reshape(output_batch, [batch_size, (- 1), output_batch.shape[(- 1)]])
    return (input_batch, output_batch)