32 #include <fors_img_screen_flat_impl.h>
34 #include <fors_utils.h>
64 cpl_recipe *recipe = cpl_calloc(1,
sizeof *recipe );
65 cpl_plugin *plugin = &recipe->interface;
69 cpl_msg_error(cpl_func,
70 "I am fors_img_screen_flat version %d, but I am linking "
71 "against the FORS library version %d. "
72 "This will not work. "
73 "Please remove all previous installations "
74 "of the " PACKAGE_NAME
" and try again.",
79 cpl_plugin_init(plugin,
82 CPL_PLUGIN_TYPE_RECIPE,
83 fors_img_screen_flat_name,
84 fors_img_screen_flat_description_short,
85 fors_img_screen_flat_description,
86 fors_img_screen_flat_author,
87 fors_img_screen_flat_email,
93 cpl_pluginlist_append(list, plugin);
113 if (cpl_error_get_code() != CPL_ERROR_NONE) {
114 cpl_msg_error(cpl_func,
115 "CPL error code is set (%s), "
116 "refusing to create recipe fors_img_screen_flat",
117 cpl_error_get_message());
125 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE) {
126 recipe = (cpl_recipe *)plugin;
136 recipe->parameters = cpl_parameterlist_new();
138 fors_img_screen_flat_define_parameters(recipe->parameters);
140 if (cpl_error_get_code() != CPL_ERROR_NONE) {
141 cpl_msg_error(cpl_func,
142 "Could not create fors_img_screen_flat parameters");
161 cpl_errorstate initial_errorstate = cpl_errorstate_get();
163 if (cpl_error_get_code() != CPL_ERROR_NONE) {
164 cpl_msg_error(cpl_func,
165 "CPL error code is set (%s), "
166 "refusing to execute recipe fors_img_screen_flat",
167 cpl_error_get_message());
171 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE) {
172 recipe = (cpl_recipe *)plugin;
178 if (recipe->frames == NULL) {
179 cpl_msg_error(cpl_func,
184 if (recipe->parameters == NULL) {
185 cpl_msg_error(cpl_func,
186 "Null parameter list");
191 fors_img_screen_flat_description_short);
193 fors_img_screen_flat(recipe->frames, recipe->parameters);
195 return fors_end(recipe->frames, initial_errorstate);
211 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE) {
212 recipe = (cpl_recipe *)plugin;
218 cpl_parameterlist_delete(recipe->parameters);
static int fors_img_screen_flat_destroy(cpl_plugin *)
Destroy what has been created by the 'create' function.
int fors_end(const cpl_frameset *frames, cpl_errorstate before_exec)
End recipe execution.
static int fors_img_screen_flat_create(cpl_plugin *)
Setup the recipe options.
void fors_begin(cpl_frameset *frames, const char *description_short)
Start recipe execution.
static int fors_img_screen_flat_exec(cpl_plugin *)
Execute the plugin instance given by the interface.
int fors_get_version_binary(void)
Get FORS library binary version number.
int cpl_plugin_get_info(cpl_pluginlist *list)
Build the list of available plugins, for this module.
const char * fors_get_license(void)
Get the pipeline copyright and license.