![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <gtk/gtk.h>#include "system/macros.h"#include "system/mem_alloc.h"#include "system/openmp.h"#include "system/simd.h"#include "apps/ansel-chart/dtcairo.h"#include "apps/ansel-chart/colorchart.h"#include "apps/ansel-chart/common.h"#include "apps/ansel-chart/deltaE.h"#include "apps/ansel-chart/pfm.h"#include "math/attic/thinplate.h"#include "apps/ansel-chart/tonecurve.h"#include "metadata/exif.h"#include <glib/gstdio.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "osx/osx.h"#include "win/main_wrapper.h"
Include dependency graph for ansel-chart/main.c:Go to the source code of this file.
Data Structures | |
| struct | dt_lut_t |
Macros | |
| #define | MAX_PATCHES 49 |
| #define | SWAP(a, b) |
Typedefs | |
| typedef struct dt_lut_t | dt_lut_t |
Enumerations | |
| enum | { COLUMN_NAME , COLUMN_RGB_IN , COLUMN_LAB_IN , COLUMN_LAB_REF , COLUMN_DE_1976 , COLUMN_DE_1976_FLOAT , COLUMN_DE_2000 , COLUMN_DE_2000_FLOAT , NUM_COLUMNS } |
Variables | |
| const double | thrs = 200.0 |
| static const point_t | bb_ref [] = {{.x=.0, .y=.0}, {.x=1., .y=0.}, {.x=1., .y=1.}, {.x=0., .y=1.}} |
| #define MAX_PATCHES 49 |
| #define SWAP | ( | a, | |
| b | |||
| ) |
| Enumerator | |
|---|---|
| COLUMN_NAME | |
| COLUMN_RGB_IN | |
| COLUMN_LAB_IN | |
| COLUMN_LAB_REF | |
| COLUMN_DE_1976 | |
| COLUMN_DE_1976_FLOAT | |
| COLUMN_DE_2000 | |
| COLUMN_DE_2000_FLOAT | |
| NUM_COLUMNS | |
Definition at line 63 of file ansel-chart/main.c.
|
static |
|
static |
Definition at line 796 of file ansel-chart/main.c.
References colorchecker_Lab, FALSE, L, N, and TRUE.
Referenced by main_csv(), and process_button_clicked_callback().
|
static |
Definition at line 759 of file ansel-chart/main.c.
References chart_t::box_table, dt_lut_t::chart, colorchecker_Lab, dt_colorspaces_deltaE_1976(), get_Lab_from_box(), i, IS_NULL_PTR, key, L, dt_lut_t::picked_source_patches, and thrs.
Referenced by process_button_clicked_callback().
|
static |
Definition at line 415 of file ansel-chart/main.c.
References dt_free, L, and open_cht().
Referenced by create_notebook_page_source().
|
static |
Definition at line 1158 of file ansel-chart/main.c.
References dt_lut_t::export_button, dt_lut_t::export_raw_button, FALSE, flags, dt_lut_t::it8_button, L, dt_lut_t::process_button, and dt_lut_t::reference_image_button.
Referenced by create_notebook_page_source().
Definition at line 1483 of file ansel-chart/main.c.
References chart_t::box_table, dt_lut_t::chart, collect_reference_patches_foreach(), and L.
Referenced by motion_notify_callback_reference(), and open_reference_image().
|
static |
Definition at line 1501 of file ansel-chart/main.c.
References checker_set_color(), DT_COLORSPACE_XYZ, get_xyz_sample_from_image(), dt_lut_t::reference, image_t::shrink, and value.
Referenced by collect_reference_patches().
Definition at line 1478 of file ansel-chart/main.c.
References chart_t::box_table, dt_lut_t::chart, collect_source_patches_foreach(), and L.
Referenced by motion_notify_callback_source(), open_cht(), and open_it8().
|
static |
Definition at line 1488 of file ansel-chart/main.c.
References checker_set_color(), DT_COLORSPACE_XYZ, find_patch(), get_xyz_sample_from_image(), key, dt_lut_t::picked_source_patches, image_t::shrink, dt_lut_t::source, and value.
Referenced by collect_source_patches().
Definition at line 970 of file ansel-chart/main.c.
Referenced by process_data().
Definition at line 1319 of file ansel-chart/main.c.
References create_notebook_page_process(), create_notebook_page_reference(), create_notebook_page_source(), L, and notebook.
Referenced by main_gui().
Definition at line 1281 of file ansel-chart/main.c.
References DT_GUI_BOX_SPACING, dt_lut_t::export_button, export_button_clicked_callback(), dt_lut_t::export_raw_button, export_raw_button_clicked_callback(), L, dt_lut_t::number_patches, dt_lut_t::process_button, process_button_clicked_callback(), and dt_lut_t::result_label.
Referenced by create_notebook().
Definition at line 1218 of file ansel-chart/main.c.
References image_t::draw_colored, image_t::drawing_area, DT_GUI_BOX_SPACING, FALSE, init_image(), dt_lut_t::it8_button, it8_changed_callback(), L, motion_notify_callback_reference(), ref_image_changed_callback(), dt_lut_t::reference, dt_lut_t::reference_image_box, dt_lut_t::reference_image_button, dt_lut_t::reference_it8_box, dt_lut_t::reference_mode, reference_mode_changed_callback(), dt_lut_t::reference_shrink, shrink_changed_callback(), and TRUE.
Referenced by create_notebook().
Definition at line 1180 of file ansel-chart/main.c.
References dt_lut_t::cht_button, cht_changed_callback(), cht_state_callback(), image_t::draw_colored, image_t::drawing_area, DT_GUI_BOX_SPACING, FALSE, dt_lut_t::image_button, init_image(), L, motion_notify_callback_source(), shrink_changed_callback(), dt_lut_t::source, source_image_changed_callback(), dt_lut_t::source_shrink, and TRUE.
Referenced by create_notebook().
Definition at line 1338 of file ansel-chart/main.c.
References add_column(), COLUMN_DE_1976, COLUMN_DE_1976_FLOAT, COLUMN_DE_2000, COLUMN_DE_2000_FLOAT, COLUMN_LAB_IN, COLUMN_LAB_REF, COLUMN_NAME, COLUMN_RGB_IN, L, dt_lut_t::model, NUM_COLUMNS, and dt_lut_t::treeview.
Referenced by main_gui().
Definition at line 134 of file ansel-chart/main.c.
References bb_ref, center_image(), image_t::chart, clear_background(), draw_boundingbox(), draw_color_boxes_inside(), draw_color_boxes_outline(), image_t::draw_colored, draw_d_boxes(), draw_f_boxes(), draw_image(), draw_no_image(), FALSE, get_homography(), homography(), image_t::image, IS_NULL_PTR, map_boundingbox_to_view(), image_t::shrink, and stroke_boxes().
Referenced by init_image().
|
static |
Definition at line 912 of file ansel-chart/main.c.
References dt_exif_xmp_encode_internal(), FALSE, k, L, MAX_PATCHES, MIN, dt_iop_colorchecker_params_t::num_patches, permutation, dt_iop_colorchecker_params_t::source_a, dt_iop_colorchecker_params_t::source_b, dt_iop_colorchecker_params_t::source_L, SWAP, dt_iop_colorchecker_params_t::target_a, dt_iop_colorchecker_params_t::target_b, dt_iop_colorchecker_params_t::target_L, and thinplate_color_pos().
Referenced by process_data().
|
static |
Definition at line 863 of file ansel-chart/main.c.
References dt_exif_xmp_encode_internal(), FALSE, k, L, dt_iop_tonecurve_params_t::tonecurve, tonecurve_apply(), dt_iop_tonecurve_params_t::tonecurve_autoscale_ab, dt_iop_tonecurve_params_t::tonecurve_nodes, dt_iop_tonecurve_params_t::tonecurve_preset, dt_iop_tonecurve_params_t::tonecurve_type, dt_iop_tonecurve_params_t::tonecurve_unbound_ab, x, dt_iop_tonecurve_node_t::x, and dt_iop_tonecurve_node_t::y.
Referenced by process_data().
Definition at line 743 of file ansel-chart/main.c.
References dt_lut_t::colorchecker_encoded, description(), dt_free, export_style(), get_export_filename(), IS_NULL_PTR, L, name, and dt_lut_t::tonecurve_encoded.
Referenced by create_notebook_page_process().
Definition at line 705 of file ansel-chart/main.c.
References dt_lut_t::chart, description(), IS_NULL_PTR, key, L, name, chart_t::patch_sets, print_patches(), and value.
Referenced by export_raw_button_clicked_callback().
Definition at line 730 of file ansel-chart/main.c.
References dt_lut_t::chart, description(), dt_free, export_raw(), get_export_filename(), IS_NULL_PTR, L, and name.
Referenced by create_notebook_page_process().
|
static |
Definition at line 657 of file ansel-chart/main.c.
References dt_lut_t::colorchecker_encoded, description(), FALSE, IS_NULL_PTR, L, name, print_xml_plugin(), dt_lut_t::tonecurve_encoded, and TRUE.
Referenced by export_button_clicked_callback(), and main_csv().
Definition at line 256 of file ansel-chart/main.c.
References d, i, L, x, point_t::x, and point_t::y.
Referenced by handle_motion().
|
static |
Definition at line 1512 of file ansel-chart/main.c.
References IS_NULL_PTR, key, and L.
Referenced by collect_source_patches_foreach().
Definition at line 1652 of file ansel-chart/main.c.
References dt_free, image_t::image, IS_NULL_PTR, L, reset_bb(), image_t::surface, and image_t::xyz.
Referenced by main(), and open_image().
Definition at line 1575 of file ansel-chart/main.c.
References image_t::bb, image_t::height, i, image_t::width, point_t::x, and point_t::y.
Referenced by get_xyz_sample_from_image().
Definition at line 1595 of file ansel-chart/main.c.
References apply_homography(), BOTTOM_LEFT, BOTTOM_RIGHT, box_t::h, homography(), i, L, box_t::p, TOP_LEFT, TOP_RIGHT, box_t::w, and point_t::x.
Referenced by get_xyz_sample_from_image().
|
static |
Definition at line 516 of file ansel-chart/main.c.
References description(), dt_free, DT_GUI_BOX_SPACING, extension(), L, name, dt_lut_t::reference_filename, TRUE, and dt_lut_t::window.
Referenced by export_button_clicked_callback(), and export_raw_button_clicked_callback().
Definition at line 335 of file ansel-chart/main.c.
References L.
Referenced by open_it8(), and open_reference_image().
Definition at line 1438 of file ansel-chart/main.c.
References box_t::color, box_t::color_space, DT_COLORSPACE_LAB, DT_COLORSPACE_XYZ, dt_XYZ_to_Lab(), i, Lab, and XYZ.
Referenced by add_patches_to_array(), print_patches(), and update_table().
|
static |
Definition at line 1606 of file ansel-chart/main.c.
References BOTTOM_LEFT, BOTTOM_RIGHT, image_t::height, L, MAX, MIN, TOP_LEFT, TOP_RIGHT, image_t::width, and x.
Referenced by get_xyz_sample_from_image().
Definition at line 1584 of file ansel-chart/main.c.
References chart_t::bb_h, chart_t::bb_w, chart_t::box_shrink, and L.
Referenced by get_xyz_sample_from_image().
|
static |
Definition at line 1524 of file ansel-chart/main.c.
References __OMP_PARALLEL_FOR__, bb_ref, BOTTOM_LEFT, BOTTOM_RIGHT, image_t::chart, get_boundingbox(), get_corners(), get_homography(), get_pixel_region(), get_sample_box(), homography(), IS_NULL_PTR, L, TOP_LEFT, TOP_RIGHT, image_t::width, x, and image_t::xyz.
Referenced by collect_reference_patches_foreach(), and collect_source_patches_foreach().
|
static |
Definition at line 214 of file ansel-chart/main.c.
References image_t::bb, FALSE, find_closest_corner(), image_t::image, IS_NULL_PTR, L, l1, l2, map_mouse_to_0_1(), TRUE, update_corner(), x, point_t::x, and point_t::y.
Referenced by motion_notify_callback_reference(), and motion_notify_callback_source().
Definition at line 1664 of file ansel-chart/main.c.
References __OMP_PARALLEL_FOR__, dt_Lab_to_XYZ(), height, L, width, and x.
Referenced by open_image().
Definition at line 1639 of file ansel-chart/main.c.
References image_t::chart, dt_lut_t::chart, draw_image_callback(), image_t::drawing_area, L, and size_allocate_callback().
Referenced by create_notebook_page_reference(), and create_notebook_page_source().
Definition at line 1457 of file ansel-chart/main.c.
References chart_t::box_table, dt_lut_t::chart, COLUMN_NAME, IS_NULL_PTR, L, dt_lut_t::model, name, and update_table().
Referenced by open_cht().
|
static |
Definition at line 485 of file ansel-chart/main.c.
References dt_free, L, and open_it8().
Referenced by create_notebook_page_reference().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 1904 of file ansel-chart/main.c.
References dt_lut_t::chart, dt_lut_t::colorchecker_encoded, dt_free, dt_free_gpointer(), dt_osx_prepare_environment(), free_chart(), free_image(), L, main_csv(), main_gui(), dt_lut_t::model, dt_lut_t::picked_source_patches, dt_lut_t::reference, show_usage(), dt_lut_t::source, and dt_lut_t::tonecurve_encoded.
Definition at line 1853 of file ansel-chart/main.c.
References add_hdr_patches(), colorchecker_Lab, description(), dt_free, export_style(), L, N, name, parse_csv(), process_data(), and TRUE.
Referenced by main().
Definition at line 1675 of file ansel-chart/main.c.
References dt_lut_t::cht_button, create_notebook(), create_table(), dt_free, dt_osx_focus_window(), dt_lut_t::export_button, dt_lut_t::export_raw_button, FALSE, dt_lut_t::image_button, dt_lut_t::it8_button, L, open_cht(), open_it8(), open_reference_image(), open_source_image(), dt_lut_t::process_button, dt_lut_t::reference_image_button, dt_lut_t::reference_mode, TRUE, dt_lut_t::window, and window.
Referenced by main().
Definition at line 175 of file ansel-chart/main.c.
References image_t::bb, i, and map_point_to_view().
Referenced by draw_image_callback().
|
static |
Definition at line 275 of file ansel-chart/main.c.
References height, L, image_t::offset_x, image_t::offset_y, width, and x.
Referenced by handle_motion().
Definition at line 180 of file ansel-chart/main.c.
References image_t::height, p, image_t::scale, image_t::width, point_t::x, and point_t::y.
Referenced by map_boundingbox_to_view().
|
static |
Definition at line 202 of file ansel-chart/main.c.
References collect_reference_patches(), handle_motion(), L, dt_lut_t::reference, and update_table().
Referenced by create_notebook_page_reference().
|
static |
Definition at line 190 of file ansel-chart/main.c.
References collect_source_patches(), handle_motion(), L, dt_lut_t::source, and update_table().
Referenced by create_notebook_page_source().
Definition at line 423 of file ansel-chart/main.c.
References chart_t::box_shrink, dt_lut_t::chart, dt_lut_t::cht_button, collect_source_patches(), image_t::drawing_area, dt_lut_t::export_button, dt_lut_t::export_raw_button, FALSE, free_chart(), init_table(), IS_NULL_PTR, dt_lut_t::it8_button, L, parse_cht(), dt_lut_t::picked_source_patches, dt_lut_t::process_button, dt_lut_t::reference, dt_lut_t::reference_image_button, dt_lut_t::reference_shrink, reset_bb(), image_t::shrink, dt_lut_t::source, and dt_lut_t::source_shrink.
Referenced by cht_changed_callback(), and main_gui().
Definition at line 370 of file ansel-chart/main.c.
References cairo_surface_create_from_xyz_data(), image_t::drawing_area, dt_free, FALSE, free_image(), image_t::height, height, image_t::image, image_lab_to_xyz(), IS_NULL_PTR, L, read_pfm(), set_offset_and_scale(), image_t::surface, TRUE, image_t::width, width, and image_t::xyz.
Referenced by open_reference_image(), and open_source_image().
Definition at line 493 of file ansel-chart/main.c.
References dt_lut_t::chart, collect_source_patches(), image_t::drawing_area, dt_free, dt_lut_t::export_button, dt_lut_t::export_raw_button, FALSE, get_filename_base(), IS_NULL_PTR, dt_lut_t::it8_button, L, parse_it8(), dt_lut_t::process_button, dt_lut_t::reference_filename, dt_lut_t::source, TRUE, and update_table().
Referenced by it8_changed_callback(), and main_gui().
Definition at line 344 of file ansel-chart/main.c.
References image_t::bb, collect_reference_patches(), image_t::drawing_area, dt_free, dt_lut_t::export_button, dt_lut_t::export_raw_button, FALSE, get_filename_base(), IS_NULL_PTR, L, open_image(), dt_lut_t::process_button, dt_lut_t::reference, dt_lut_t::reference_filename, dt_lut_t::reference_image_button, dt_lut_t::source, update_table(), and image_t::xyz.
Referenced by main_gui(), and ref_image_changed_callback().
Definition at line 317 of file ansel-chart/main.c.
References dt_lut_t::cht_button, image_t::drawing_area, dt_lut_t::image_button, IS_NULL_PTR, L, open_image(), and dt_lut_t::source.
Referenced by main_gui(), and source_image_changed_callback().
|
static |
Definition at line 1745 of file ansel-chart/main.c.
References d, description(), f, i, IS_NULL_PTR, key, L, N, name, thrs, and value.
Referenced by main_csv().
Definition at line 616 of file ansel-chart/main.c.
References chart_t::box_table, dt_lut_t::chart, get_Lab_from_box(), i, IS_NULL_PTR, key, L, and dt_lut_t::picked_source_patches.
Referenced by export_raw().
Definition at line 1113 of file ansel-chart/main.c.
References add_hdr_patches(), add_patches_to_array(), chart_t::box_table, dt_lut_t::chart, dt_lut_t::colorchecker_encoded, colorchecker_Lab, dt_free, dt_lut_t::export_button, dt_lut_t::export_raw_button, FALSE, i, IS_NULL_PTR, L, N, dt_lut_t::number_patches, chart_t::patch_sets, process_data(), dt_lut_t::tonecurve_encoded, TRUE, and value.
Referenced by create_notebook_page_process().
|
static |
Definition at line 977 of file ansel-chart/main.c.
References coeff, dt_lut_t::colorchecker_encoded, colorchecker_Lab, compare_L_source(), dt_free, encode_colorchecker(), encode_tonecurve(), i, IS_NULL_PTR, k, L, Lab, N, perm, dt_lut_t::result_label, rgb, thinplate_match(), tonecurve_apply(), tonecurve_create(), tonecurve_delete(), dt_lut_t::tonecurve_encoded, and tonecurve_unapply().
Referenced by main_csv(), and process_button_clicked_callback().
|
static |
Definition at line 327 of file ansel-chart/main.c.
References dt_free, L, and open_reference_image().
Referenced by create_notebook_page_reference().
|
static |
Definition at line 460 of file ansel-chart/main.c.
References image_t::drawing_area, FALSE, dt_lut_t::it8_button, L, dt_lut_t::reference, dt_lut_t::reference_image_box, dt_lut_t::reference_image_button, and dt_lut_t::reference_it8_box.
Referenced by create_notebook_page_reference().
Definition at line 1627 of file ansel-chart/main.c.
References image_t::bb, BOTTOM_LEFT, BOTTOM_RIGHT, TOP_LEFT, TOP_RIGHT, point_t::x, and point_t::y.
Referenced by free_image(), and open_cht().
Definition at line 1172 of file ansel-chart/main.c.
References image_t::drawing_area, L, and image_t::shrink.
Referenced by create_notebook_page_reference(), and create_notebook_page_source().
|
static |
Definition at line 128 of file ansel-chart/main.c.
References set_offset_and_scale(), and image_t::width.
Referenced by init_image().
|
static |
Definition at line 309 of file ansel-chart/main.c.
References dt_free, L, and open_source_image().
Referenced by create_notebook_page_source().
Definition at line 284 of file ansel-chart/main.c.
References image_t::bb, BOTTOM_LEFT, BOTTOM_RIGHT, L, TOP_LEFT, TOP_RIGHT, x, point_t::x, and point_t::y.
Referenced by handle_motion().
Definition at line 1381 of file ansel-chart/main.c.
References chart_t::box_table, dt_lut_t::chart, COLUMN_DE_1976, COLUMN_DE_1976_FLOAT, COLUMN_DE_2000, COLUMN_DE_2000_FLOAT, COLUMN_LAB_IN, COLUMN_LAB_REF, COLUMN_NAME, COLUMN_RGB_IN, dt_colorspaces_deltaE_1976(), dt_colorspaces_deltaE_2000(), dt_free, get_Lab_from_box(), L, Lab, dt_lut_t::model, name, dt_lut_t::picked_source_patches, and box_t::rgb.
Referenced by init_table(), motion_notify_callback_reference(), motion_notify_callback_source(), open_it8(), and open_reference_image().
Definition at line 61 of file ansel-chart/main.c.
Referenced by draw_image_callback(), and get_xyz_sample_from_image().
Definition at line 59 of file ansel-chart/main.c.
Referenced by _dt_focus_update(), add_patches_to_array(), demosaic_ppg(), dt_iop_colorcorrection_motion_notify(), get_scales(), parse_csv(), process_cl(), process_wavelets(), process_wavelets(), process_wavelets_cl(), and tiling_callback().