n_primal = 5
n_dual = 5
mu_water = 0.02
photons_per_pixel = 10000
DATA_FOLDER = '/media/tx-eva-cc/data/2018_03_26_WuHanTongJi/'
# '/mnt/data2/Infervision/test_gt/dcm/'

FNAME = 'LDHDLungSS40'
# 'BJYY00191495T125'

# dcm_name = '1517110864_075.dcm'
#'/media/tx-eva-cc/data/2018_03_26_WuHanTongJi/1517110864/LDHDLungSS40'

# '/media/tx-eva-cc/data/WHTJ_Test/1517068707'

file_loader = FileLoader(DATA_FOLDER, exclude='L286')


def generate_data(validation=False, data_folder=DATA_FOLDER, fname=FNAME):
    """Generate a set of random data."""
    # n_iter = 1 if validation else n_data

    # y_arr = np.empty((n_iter, operator.range.shape[0], operator.range.shape[1], 1), dtype='float32')
    # x_true_arr = np.empty((n_iter, space.shape[0], space.shape[1], 1), dtype='float32')
    # if validation:
    #     n_data = len([fname for fname in os.listdir(validation_path)
    #                   if os.path.isfile(os.path.join(validation_path, fname))])
    # else:
    #     n_data = len([fname for fname in os.listdir(train_path)
    #                   if os.path.isfile(os.path.join(train_path, fname))])
    # y_arr = np.empty((n_data, operator.range.shape[0], operator.range.shape[1], 1), dtype='float32')
n_iter = 10
n_primal = 2
n_dual = 1
mu_water = 0.02
photons_per_pixel = 10000
batch_size = 1
DATA_FOLDER = '/media/tx-eva-cc/data/WHTJ_Test/1517068707/'
train_path = os.path.join(DATA_FOLDER, 'train')
validation_path = os.path.join(DATA_FOLDER, 'validation')
folder_name = '1517068707'

# print  [os.path.isfile(os.path.join(validation_path,fname)) for fname in os.listdir(validation_path)]

if not if_ordered:
    file_loader_train = FileLoader(train_path, exclude='')
    file_loader_validation = FileLoader(validation_path, exclude='')

def generate_data(validation=False, img_num = 1):
    """Generate a set of random data."""
    # n_iter = 1 if validation else n_data

    # y_arr = np.empty((n_iter, operator.range.shape[0], operator.range.shape[1], 1), dtype='float32')
    # x_true_arr = np.empty((n_iter, space.shape[0], space.shape[1], 1), dtype='float32')
    # if validation:
    #     n_data = len([fname for fname in os.listdir(validation_path)
    #                   if os.path.isfile(os.path.join(validation_path, fname))])
    # else:
    #     n_data = len([fname for fname in os.listdir(train_path)
    #                   if os.path.isfile(os.path.join(train_path, fname))])
    # y_arr = np.empty((n_data, operator.range.shape[0], operator.range.shape[1], 1), dtype='float32')