aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/colscale.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-02-26 14:20:04 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:24 +0200
commitcb47e755858296d59f4ceb373bcd20b045004f56 (patch)
tree5526da31f373c3e1323dbae80f12caa13b9e38e8 /libcrystfel/src/colscale.h
parentca3b3162f037506ae224e0f8bb7c6f669a43d1b1 (diff)
Move colour scale and pixbuf rendering to libcrystfel
Also, split into two files (colscale and render), and remove TIFF stuff.
Diffstat (limited to 'libcrystfel/src/colscale.h')
-rw-r--r--libcrystfel/src/colscale.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/libcrystfel/src/colscale.h b/libcrystfel/src/colscale.h
new file mode 100644
index 00000000..41e8c9e8
--- /dev/null
+++ b/libcrystfel/src/colscale.h
@@ -0,0 +1,62 @@
+/*
+ * colscale.h
+ *
+ * Colour scales
+ *
+ * Copyright © 2012-2020 Deutsches Elektronen-Synchrotron DESY,
+ * a research centre of the Helmholtz Association.
+ *
+ * Authors:
+ * 2009-2012 Thomas White <taw@physics.org>
+ *
+ * This file is part of CrystFEL.
+ *
+ * CrystFEL is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CrystFEL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CrystFEL. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifndef COLSCALE_H
+#define COLSCALE_H
+
+/**
+ * \file colscale.h
+ * Colour scales for rendering
+ */
+
+enum {
+ SCALE_COLOUR,
+ SCALE_MONO,
+ SCALE_INVMONO,
+ SCALE_RATIO,
+ SCALE_GEOPTIMISER
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Colour scale lookup */
+extern void render_scale(double val, double max, int scale,
+ double *rp, double *gp, double *bp);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* COLSCALE_H */