![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/darktable.h"#include "common/opencl.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_math.h"#include "develop/imageop_gui.h"#include "develop/openmp_maths.h"#include "dtgtk/button.h"#include "dtgtk/resetlabel.h"#include "gui/gtk.h"#include "gui/presets.h"#include "gui/color_picker_proxy.h"#include "iop/iop_api.h"#include <glib.h>#include <math.h>#include <stdlib.h>
Include dependency graph for negadoctor.c:Data Structures | |
| struct | dt_iop_negadoctor_params_t |
| struct | dt_iop_negadoctor_data_t |
| struct | dt_iop_negadoctor_gui_data_t |
| struct | dt_iop_negadoctor_global_data_t |
Macros | |
| #define | THRESHOLD 2.3283064365386963e-10f |
Typedefs | |
| typedef enum dt_iop_negadoctor_filmstock_t | dt_iop_negadoctor_filmstock_t |
| typedef struct dt_iop_negadoctor_params_t | dt_iop_negadoctor_params_t |
| typedef struct dt_iop_negadoctor_data_t | dt_iop_negadoctor_data_t |
| typedef struct dt_iop_negadoctor_gui_data_t | dt_iop_negadoctor_gui_data_t |
| typedef struct dt_iop_negadoctor_global_data_t | dt_iop_negadoctor_global_data_t |
Enumerations | |
| enum | dt_iop_negadoctor_filmstock_t { DT_FILMSTOCK_NB = 0 , DT_FILMSTOCK_COLOR = 1 } |
| #define THRESHOLD 2.3283064365386963e-10f |
DOCUMENTATION
This module allows to invert scanned negatives and simulate their print on paper, based on Kodak Cineon densitometry algorithm. It is better than the old invert module because it takes into account the Dmax of the film and allows white balance adjustments, as well as paper grade (gamma) simulation. It also allows density correction in log space, to account for the exposure settings of the scanner. Finally, it is applied after input colour profiling, which means the inversion happens after the scanner or the camera got color-corrected, while the old invert module invert the RAW, non-demosaiced, file before any colour correction.
References :
| typedef struct dt_iop_negadoctor_data_t dt_iop_negadoctor_data_t |
| typedef struct dt_iop_negadoctor_global_data_t dt_iop_negadoctor_global_data_t |
| typedef struct dt_iop_negadoctor_gui_data_t dt_iop_negadoctor_gui_data_t |
| typedef struct dt_iop_negadoctor_params_t dt_iop_negadoctor_params_t |
| const char * aliases | ( | ) |
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, fast_exp10f(), g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color_max, dt_gui_gtk_t::reset, RGB, THRESHOLD, TRUE, v_maxf(), and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color_min, dt_gui_gtk_t::reset, RGB, THRESHOLD, TRUE, v_maxf(), and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
References darktable, darktable_t::develop, Dmin_picker_update(), dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_gui_gtk_t::reset, TRUE, and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, fast_exp10f(), g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color_min, dt_gui_gtk_t::reset, RGB, THRESHOLD, TRUE, v_minf(), and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color_max, dt_gui_gtk_t::reset, RGB, THRESHOLD, TRUE, v_minf(), and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_gui_gtk_t::reset, THRESHOLD, TRUE, v_minf(), WB_high_picker_update(), and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_gui_gtk_t::reset, THRESHOLD, TRUE, v_minf(), WB_low_picker_update(), and dt_iop_module_t::widget.
Referenced by color_picker_apply().
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
| void commit_params | ( | dt_iop_module_t * | self, |
| dt_iop_params_t * | p1, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References c, d, dt_dev_pixelpipe_iop_t::data, DT_FILMSTOCK_COLOR, DT_FILMSTOCK_NB, and p.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_RGB.
| int default_group | ( | ) |
References IOP_GROUP_FILM.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
static |
References c, darktable, darktable_t::develop, Dmin_picker_update(), dt_bauhaus_slider_set(), dt_dev_add_history_item, dt_iop_color_picker_reset(), g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References DT_FILMSTOCK_COLOR, DT_FILMSTOCK_NB, g, dt_iop_module_t::gui_data, p, and dt_iop_module_t::params.
Referenced by apply_auto_Dmin(), Dmin_picker_callback(), and gui_changed().
| int flags | ( | ) |
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_ONE_INSTANCE.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
References Dmin_picker_update(), dt_bauhaus_slider_set(), DT_FILMSTOCK_NB, g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, toggle_stock_controls(), WB_high_picker_update(), and WB_low_picker_update().
Referenced by gui_update().
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References dt_conf_set_int(), g, and dt_iop_module_t::gui_data.
| void gui_init | ( | dt_iop_module_t * | self | ) |
References Dmin_picker_callback(), dt_action_button_new(), dt_bauhaus_combobox_from_params(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_default(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_factor(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_min(), DT_BAUHAUS_SPACE, dt_bauhaus_widget_set_label(), DT_COLOR_PICKER_AREA, dt_color_picker_new(), dt_conf_get_int(), dt_ui_notebook_new(), dt_ui_notebook_page(), dt_ui_section_label_new(), FALSE, g, IOP_GUI_ALLOC, row1, row2, TRUE, Wb_high_norm_callback(), WB_high_picker_callback(), Wb_low_norm_callback(), WB_low_picker_callback(), and dt_iop_module_t::widget.
| void gui_reset | ( | dt_iop_module_t * | self | ) |
References dt_iop_color_picker_reset(), and TRUE.
| void gui_update | ( | dt_iop_module_t *const | self | ) |
Refresh GUI controls from current params and configuration.
References dt_bauhaus_slider_set(), dt_iop_color_picker_reset(), g, gui_changed(), dt_iop_module_t::gui_data, p, dt_iop_module_t::params, and TRUE.
| void init | ( | dt_iop_module_t * | module | ) |
References d, dt_iop_negadoctor_params_t::Dmin, and dt_iop_default_init().
| void init_global | ( | dt_iop_module_so_t * | module | ) |
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| void init_presets | ( | dt_iop_module_so_t * | self | ) |
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
References d, dt_iop_module_t::default_params, n, and soft_clip().
| const char * name | ( | ) |
| int process | ( | struct dt_iop_module_t *const | self, |
| const dt_dev_pixelpipe_t *const | pipe, | ||
| const dt_dev_pixelpipe_iop_t *const | piece, | ||
| const void *const restrict | ivoid, | ||
| void *const restrict | ovoid | ||
| ) |
|
static |
References g.
Referenced by toggle_stock_controls().
|
static |
References dt_bauhaus_widget_set_label(), DT_FILMSTOCK_COLOR, DT_FILMSTOCK_NB, FALSE, g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, setup_color_variables(), and TRUE.
Referenced by gui_changed().
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, v_minf(), WB_low_picker_update(), and dt_iop_module_t::widget.
Referenced by gui_init().
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_dev_add_history_item, dt_iop_color_picker_reset(), g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, RGB, TRUE, v_minf(), and WB_high_picker_update().
Referenced by gui_init().
|
static |
References c, g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, and v_maxf().
Referenced by apply_auto_WB_high(), gui_changed(), and WB_high_picker_callback().
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, TRUE, v_maxf(), WB_low_picker_update(), and dt_iop_module_t::widget.
Referenced by gui_init().
|
static |
References c, darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_dev_add_history_item, dt_iop_color_picker_reset(), g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, RGB, TRUE, v_minf(), and WB_low_picker_update().
Referenced by gui_init().
|
static |
References c, g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, and v_maxf().
Referenced by apply_auto_WB_low(), gui_changed(), Wb_high_norm_callback(), Wb_low_norm_callback(), and WB_low_picker_callback().