def vol_seg_prior(*args, proc_vol_fn=None, proc_seg_fn=None, prior_type='location', prior_file=None, prior_feed='input', patch_stride=1, patch_size=None, batch_size=1, collapse_2d=None, extract_slice=None, force_binary=False, nb_input_feats=1, verbose=False, vol_rand_seed=None, patch_rand=None, **kwargs):
    '\n    generator that appends prior to (volume, segmentation) depending on input\n    e.g. could be ((volume, prior), segmentation)\n    '
    patch_rand_seed = None
    if patch_rand:
        patch_rand_seed = np.random.random()
    gen = vol_seg(*args, **kwargs, proc_vol_fn=None, proc_seg_fn=None, collapse_2d=collapse_2d, extract_slice=extract_slice, force_binary=force_binary, verbose=verbose, patch_size=patch_size, patch_stride=patch_stride, batch_size=batch_size, vol_rand_seed=vol_rand_seed, patch_rand=patch_rand, patch_rand_seed=patch_rand_seed, nb_input_feats=nb_input_feats)
    pgen = add_prior(gen, proc_vol_fn=proc_vol_fn, proc_seg_fn=proc_seg_fn, prior_type=prior_type, prior_file=prior_file, prior_feed=prior_feed, patch_stride=patch_stride, patch_size=patch_size, batch_size=batch_size, collapse_2d=collapse_2d, extract_slice=extract_slice, force_binary=force_binary, verbose=verbose, patch_rand=patch_rand, patch_rand_seed=patch_rand_seed)
    while 1:
        (gen_sample, prior_batch) = next(pgen)
        (input_vol, output_vol) = gen_sample
        if (prior_feed == 'input'):
            (yield ([input_vol, prior_batch], output_vol))
        else:
            assert (prior_feed == 'output')
            (yield (input_vol, [output_vol, prior_batch]))
generator that appends prior to (volume, segmentation) depending on input
e.g. could be ((volume, prior), segmentation)
def vol_seg_prior(*args, proc_vol_fn=None, proc_seg_fn=None, prior_type='location', prior_file=None, prior_feed='input', patch_stride=1, patch_size=None, batch_size=1, collapse_2d=None, extract_slice=None, force_binary=False, nb_input_feats=1, verbose=False, vol_rand_seed=None, patch_rand=None, **kwargs):
    '\n    generator that appends prior to (volume, segmentation) depending on input\n    e.g. could be ((volume, prior), segmentation)\n    '
    patch_rand_seed = None
    if patch_rand:
        patch_rand_seed = np.random.random()
    gen = vol_seg(*args, **kwargs, proc_vol_fn=None, proc_seg_fn=None, collapse_2d=collapse_2d, extract_slice=extract_slice, force_binary=force_binary, verbose=verbose, patch_size=patch_size, patch_stride=patch_stride, batch_size=batch_size, vol_rand_seed=vol_rand_seed, patch_rand=patch_rand, patch_rand_seed=patch_rand_seed, nb_input_feats=nb_input_feats)
    pgen = add_prior(gen, proc_vol_fn=proc_vol_fn, proc_seg_fn=proc_seg_fn, prior_type=prior_type, prior_file=prior_file, prior_feed=prior_feed, patch_stride=patch_stride, patch_size=patch_size, batch_size=batch_size, collapse_2d=collapse_2d, extract_slice=extract_slice, force_binary=force_binary, verbose=verbose, patch_rand=patch_rand, patch_rand_seed=patch_rand_seed)
    while 1:
        (gen_sample, prior_batch) = next(pgen)
        (input_vol, output_vol) = gen_sample
        if (prior_feed == 'input'):
            (yield ([input_vol, prior_batch], output_vol))
        else:
            assert (prior_feed == 'output')
            (yield (input_vol, [output_vol, prior_batch]))