diff options
author | Valerio Mariani <valerio.mariani@desy.de> | 2015-01-26 18:22:31 +0100 |
---|---|---|
committer | valerio.mariani@desy.de <vmariani@cfeld-valerio2.desy.de> | 2015-01-27 14:11:56 +0100 |
commit | a61f606acdfb844d105c10243fb8a1751525adea (patch) | |
tree | 03f61645cfc7636d9ce9ad4f2d3803b88bdaafe5 | |
parent | 07fab90f63443a4b048008298ecad2c53a5276bc (diff) |
Add write_detector_geometry_2() to avoid changing API
-rw-r--r-- | libcrystfel/src/detector.c | 16 | ||||
-rw-r--r-- | libcrystfel/src/detector.h | 10 | ||||
-rw-r--r-- | src/dw-hdfsee.c | 6 |
3 files changed, 22 insertions, 10 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index 7c7e5cd6..1a799637 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -1948,10 +1948,10 @@ void get_pixel_extents(struct detector *det, } -int write_detector_geometry(const char *geometry_filename, - const char *output_filename, struct detector *det, - const char *additional_comment, - int write_panel_coffset) +int write_detector_geometry_2(const char *geometry_filename, + const char *output_filename, struct detector *det, + const char *additional_comment, + int write_panel_coffset) { FILE *ifh; FILE *fh; @@ -2108,6 +2108,14 @@ int write_detector_geometry(const char *geometry_filename, } +int write_detector_geometry(const char *geometry_filename, + const char *output_filename, struct detector *det) +{ + return write_detector_geometry_2(geometry_filename, output_filename, + det, NULL, 0); +} + + /** * mark_resolution_range_as_bad: * @image: An image structure diff --git a/libcrystfel/src/detector.h b/libcrystfel/src/detector.h index 489087ec..819b2e69 100644 --- a/libcrystfel/src/detector.h +++ b/libcrystfel/src/detector.h @@ -235,11 +235,15 @@ extern double smallest_q(struct image *image); extern struct panel *find_panel_by_name(struct detector *det, const char *name); +extern int write_detector_geometry_2(const char *geometry_filename, + const char *output_filename, + struct detector *det, + const char *additional_comment, + int write_panel_coffset); + extern int write_detector_geometry(const char *geometry_filename, const char *output_filename, - struct detector *det, - const char *additional_comment, - int write_panel_coffset); + struct detector *det); extern void mark_resolution_range_as_bad(struct image *image, double min, double max); diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index 287c7349..94d4d62b 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -1207,9 +1207,9 @@ static int save_geometry_file(DisplayWindow *dw) gtk_dialog_run(GTK_DIALOG(d)); output_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (d)); - w = write_detector_geometry(dw->geom_filename, output_filename, - dw->image->det, "Manually optimized with " - "hdfsee", 0); + w = write_detector_geometry_2(dw->geom_filename, output_filename, + dw->image->det, "Manually optimized with " + "hdfsee", 0); if ( w != 0 ) { ERROR("Error saving geometry!\n"); } |