![]() |
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>
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 darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, fast_exp10f(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_iop_module_t::picked_color_max, dt_gui_gtk_t::reset, THRESHOLD, TRUE, v_maxf(), and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_iop_module_t::picked_color_min, dt_gui_gtk_t::reset, 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, darktable_t::gui, dt_iop_module_t::gui_data, 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 darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, fast_exp10f(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_iop_module_t::picked_color_min, dt_gui_gtk_t::reset, THRESHOLD, TRUE, v_minf(), and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_iop_module_t::picked_color_max, dt_gui_gtk_t::reset, THRESHOLD, TRUE, v_minf(), and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, 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 darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, 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.
void color_picker_apply | ( | dt_iop_module_t * | self, |
GtkWidget * | picker, | ||
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 dt_iop_negadoctor_data_t::black, dt_dev_pixelpipe_iop_t::data, dt_iop_negadoctor_data_t::Dmin, DT_FILMSTOCK_COLOR, DT_FILMSTOCK_NB, dt_iop_negadoctor_data_t::exposure, dt_iop_negadoctor_data_t::gamma, dt_iop_negadoctor_data_t::offset, dt_iop_negadoctor_data_t::soft_clip, dt_iop_negadoctor_data_t::soft_clip_comp, and dt_iop_negadoctor_data_t::wb_high.
int default_colorspace | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
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 |
|
static |
References DT_FILMSTOCK_COLOR, DT_FILMSTOCK_NB, dt_iop_module_t::gui_data, 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 | ||
) |
void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References dt_conf_set_int(), 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, IOP_GUI_ALLOC, 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 | ) |
void init | ( | dt_iop_module_t * | module | ) |
References 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, and dt_dev_pixelpipe_iop_t::data_size.
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 dt_iop_negadoctor_params_t::black, dt_iop_negadoctor_params_t::D_max, dt_iop_module_t::default_params, dt_iop_negadoctor_params_t::Dmin, dt_iop_negadoctor_params_t::exposure, dt_iop_negadoctor_params_t::film_stock, dt_iop_negadoctor_params_t::gamma, dt_iop_negadoctor_params_t::offset, soft_clip(), dt_iop_negadoctor_params_t::soft_clip, dt_iop_negadoctor_params_t::wb_high, and dt_iop_negadoctor_params_t::wb_low.
const char * name | ( | ) |
void process | ( | struct dt_iop_module_t *const | self, |
dt_dev_pixelpipe_iop_t *const | piece, | ||
const void *const restrict | ivoid, | ||
void *const restrict | ovoid, | ||
const dt_iop_roi_t *const restrict | roi_in, | ||
const dt_iop_roi_t *const restrict | roi_out | ||
) |
References dt_iop_negadoctor_data_t::black, dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, dt_iop_negadoctor_data_t::Dmin, DT_DEV_PIXELPIPE_DISPLAY_MASK, dt_iop_alpha_copy(), dt_iop_negadoctor_data_t::exposure, fast_exp10f(), fast_expf(), dt_iop_negadoctor_data_t::gamma, dt_iop_negadoctor_data_t::offset, dt_dev_pixelpipe_iop_t::pipe, dt_iop_negadoctor_data_t::soft_clip, dt_iop_negadoctor_data_t::soft_clip_comp, THRESHOLD, and dt_iop_negadoctor_data_t::wb_high.
|
static |
Referenced by toggle_stock_controls().
|
static |
References dt_bauhaus_widget_set_label(), DT_FILMSTOCK_COLOR, DT_FILMSTOCK_NB, FALSE, dt_iop_module_t::gui_data, dt_iop_module_t::params, setup_color_variables(), and TRUE.
Referenced by gui_changed().
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, 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 |
|
static |
References dt_iop_module_t::gui_data, dt_iop_module_t::params, and v_maxf().
Referenced by apply_auto_WB_high(), gui_changed(), and WB_high_picker_callback().
|
static |
References darktable, darktable_t::develop, dt_bauhaus_slider_set(), dt_control_queue_redraw_widget(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, 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 |
|
static |
References dt_iop_module_t::gui_data, 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().