def fill_global_data(table): nrows = table.nrows ncols = table.ncols for rownum in range(1,nrows): count = 0 # count the row number row = table.row_values(rownum) for i in row: for case in switch(i): if case(gl.COOL_CHAR): gl.COOL_COL = count break if case(gl.NORMAL_CHAR): gl.NORMAL_COL = count break if case(gl.WARM_CHAR): gl.WARM_COL = count break if case(gl.BRIGHTNESS_CHAR): gl.BRIGHTNESS_COL = count break if case(gl.CONTRAST_CHAR): gl.CONTRAST_COL = count break if case(gl.SATURATION_CHAR): gl.SATURATION_COL = count break if case(gl.HUE_CHAR): gl.HUE_COL = count break if case(gl.SHARPNESS_CHAR): gl.SHARPNESS_COL = count break count +=1
def fill_offset_dict(row, dict_key): for count in range(len(row)): for case in switch(count): if case(gl.COOL_COL): gl.DICT_OFFSET_COOL[dict_key] = row[count] break if case(gl.NORMAL_COL): gl.DICT_OFFSET_NORMAL[dict_key] = row[count] break if case(gl.WARM_COL): gl.DICT_OFFSET_WARM[dict_key] = row[count] break
def fill_color_dict(row, dict_key): for count in range(len(row)): for case in switch(count): if case(gl.COOL_COL): gl.DICT_GAIN_COOL[dict_key] = row[count] break if case(gl.NORMAL_COL): gl.DICT_GAIN_NORMAL[dict_key] = row[count] break if case(gl.WARM_COL): gl.DICT_GAIN_WARM[dict_key] = row[count] break
def fill_nonliner_pc_dict(row, dict_key): for count in range(len(row)): for case in switch(count): if case(gl.BRIGHTNESS_COL): gl.DICT_PC_BRIGHT[dict_key] = row[count] break if case(gl.CONTRAST_COL): gl.DICT_PC_CONTRAST[dict_key] = row[count] break if case(gl.SATURATION_COL): gl.DICT_PC_SATURATION[dict_key] = row[count] break if case(gl.HUE_COL): gl.DICT_PC_HUE[dict_key] = row[count] break if case(gl.SHARPNESS_COL): gl.DICT_PC_SHARP[dict_key] = row[count] break