d2::combine::get_image_dynamic(): Use lrintf() instead of floor() and ceil().
[Ale.git] / d2.h
blobe5eda029f8577d5c624cd94f289d9b2d717c1556
1 // Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
2 // <dhilvert@ugcs.caltech.edu>
4 /* This file is part of the Anti-Lamenessing Engine.
6 The Anti-Lamenessing Engine is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 The Anti-Lamenessing Engine is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with the Anti-Lamenessing Engine; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * Top-level header file for classes treating scenes as two-dimensional data.
23 * autoconf 'config.h' should be included after this file, as we undefine
24 * various autoconf defines herein.
27 #include <stdint.h>
28 #include <assert.h>
29 #include <math.h>
30 #include <stdlib.h>
31 #include <stdio.h>
32 #include <string.h>
33 #include <limits.h>
35 #include <vector>
36 #include <stack>
37 #include <algorithm>
39 #include "ale_real.h"
40 #include "ale_accum.h"
41 #include "ale_pos.h"
42 #include "ui/ui.h"
45 #include <iostream>
46 #include <ostream>
47 #include <typeinfo>
49 #ifdef USE_MAGICK
50 #include <magick/api.h>
53 * ImageMagick defines these, for reasons unclear.
54 * Since they clash with autotools names, undefine
55 * them here.
58 #undef PACKAGE_TARNAME
59 #undef PACKAGE_VERSION
60 #undef PACKAGE_STRING
61 #undef PACKAGE_NAME
62 #undef PACKAGE_BUGREPORT
63 #endif
65 #ifdef USE_FFTW
66 #include <fftw3.h>
67 #endif
69 #ifdef USE_UNIX
70 #include <sys/types.h>
71 #include <unistd.h>
72 #include <sys/wait.h>
73 #endif
75 #ifndef M_PI
76 #define M_PI 3.14159265358979323846
77 #endif
79 #ifdef USE_PTHREAD
80 #include <pthread.h>
81 #include "thread.h"
82 #endif
84 #include "rand.h"
89 * All header files in the d2 namespace.
92 namespace d2 {
93 #include "d2/exclusion.h"
94 #include "d2/pixel.h"
95 #include "d2/spixel.h"
96 #include "d2/pixel_accum.h"
97 #include "d2/exposure/exposure.h"
98 #include "d2/exposure/exposure_default.h"
99 #include "d2/exposure/exposure_linear.h"
100 #include "d2/exposure/exposure_boolean.h"
101 #include "d2/align.h"
102 #include "d2/transformation.h"
103 #include "d2/image.h"
107 * XXX: The placement of this file is somewhat of a hack. What should
108 * be done about this?
110 #include "optimizations.h"
112 namespace d2 {
113 #include "d2/image_ale_real.h"
114 #include "d2/image_weighted_avg.h"
115 #include "d2/image_weighted_simple.h"
116 #include "d2/image_weighted_median.h"
117 #include "d2/image_zero.h"
118 #include "d2/image_rw.h"
119 #include "d2/point.h"
120 #include "d2/ppm.h"
121 #include "d2/render.h"
122 #include "d2/render_parse.h"
123 #include "d2/tfile.h"
124 #include "d2/filter.h"
125 #include "d2/render/combine.h"
126 // #include "d2/render/drizzle.h"
127 // #include "d2/render/usm.h"
128 #include "d2/render/ipc.h"
129 // #include "d2/render/merge.h"
130 #include "d2/render/psf/psf.h"
131 #include "d2/render/psf/psf_template.h"
132 #include "d2/render/psf/box.h"
133 #include "d2/render/psf/circle.h"
134 #include "d2/render/psf/sum.h"
135 #include "d2/render/psf/stdin.h"
136 #include "d2/render/psf/stdin_vg.h"
137 #include "d2/render/psf/convolution.h"
138 #include "d2/render/psf/scalar_mult.h"
139 #include "d2/render/psf/psf_parse.h"
140 #include "d2/render/psf/psf_calibrate.h"
141 #include "d2/vise_core.h"