1 #include "hkl-binoculars.h"
2 #include <bindings.dsl.h>
5 {-# LANGUAGE DataKinds #-}
6 {-# LANGUAGE FlexibleInstances #-}
7 {-# LANGUAGE ForeignFunctionInterface #-}
8 {-# LANGUAGE KindSignatures #-}
9 {-# LANGUAGE TypeInType #-}
10 {-# LANGUAGE OverloadedStrings #-}
12 {-# OPTIONS_GHC -fno-warn-orphans #-}
13 {-# OPTIONS_GHC -fno-warn-unused-binds #-}
16 Copyright : Copyright (C) 2014-2024 Synchrotron SOLEIL
17 L'Orme des Merisiers Saint-Aubin
18 BP 48 91192 GIF-sur-YVETTE CEDEX
21 Maintainer : Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>
22 Stability : Experimental
23 Portability: GHC only (not tested)
26 module Hkl.C.Binoculars where
28 import Data.Array.Repa (Shape)
29 import Data.Int (Int32)
30 import Data.Word (Word16, Word32)
31 import Foreign.C.Types (CBool, CDouble(..), CInt(..), CSize(..), CUInt(..), CPtrdiff)
32 import Foreign.C.String (CString)
33 import Foreign.ForeignPtr (ForeignPtr, newForeignPtr, withForeignPtr)
34 import Foreign.Ptr (FunPtr, Ptr)
35 import System.IO.Unsafe (unsafePerformIO)
39 withForeignPtrs :: [ForeignPtr a] -> ([Ptr a] -> IO r) -> IO r
40 withForeignPtrs [] f = f []
41 withForeignPtrs (fp:fps) f =
42 withForeignPtr fp $ \p ->
43 withForeignPtrs fps $ \ps -> f (p:ps)
50 #opaque_t HklBinocularsAxisLimits
52 #ccall hkl_binoculars_axis_limits_free, \
53 Ptr <HklBinocularsAxisLimits> -> IO ()
55 #ccall hkl_binoculars_axis_limits_new, \
56 Ptr CPtrdiff -> Ptr CPtrdiff -> IO (Ptr <HklBinocularsAxisLimits>)
62 #opaque_t HklBinocularsCube
64 data Cube sh = Cube (ForeignPtr C'HklBinocularsCube)
68 newCube :: Ptr C'HklBinocularsCube -> IO (Cube sh)
69 newCube p = Cube <$> (newForeignPtr p'hkl_binoculars_cube_free p)
71 instance Shape sh => Semigroup (Cube sh) where
75 (Cube fpa) <> (Cube fpb) = unsafePerformIO $ do
76 withForeignPtr fpa $ \pa ->
77 withForeignPtr fpb $ \pb ->
78 newCube =<< {-# SCC "c'hkl_binoculars_cube_new_merge'" #-} c'hkl_binoculars_cube_new_merge pa pb
80 #ccall hkl_binoculars_cube_new_merge, \
81 Ptr <HklBinocularsCube> -> Ptr <HklBinocularsCube> -> IO (Ptr <HklBinocularsCube>)
83 instance Shape sh => Monoid (Cube sh) where
87 #ccall hkl_binoculars_cube_add_space, Ptr <HklBinocularsCube> -> Ptr <HklBinocularsSpace> -> IO ()
88 #ccall hkl_binoculars_cube_free, Ptr <HklBinocularsCube> -> IO ()
89 #ccall hkl_binoculars_cube_new, CSize -> Ptr (Ptr <HklBinocularsSpace>) -> IO (Ptr <HklBinocularsCube>)
90 #ccall hkl_binoculars_cube_new_empty, IO (Ptr <HklBinocularsCube>)
91 #ccall hkl_binoculars_cube_new_empty_from_cube, Ptr <HklBinocularsCube> -> IO (Ptr <HklBinocularsCube>)
92 #ccall hkl_binoculars_cube_save_hdf5, CString -> CString -> Ptr <HklBinocularsCube> -> IO ()
98 #integral_t HklBinocularsDetectorEnum
100 #num HKL_BINOCULARS_DETECTOR_IMXPAD_S140
101 #num HKL_BINOCULARS_DETECTOR_XPAD_FLAT_CORRECTED
102 #num HKL_BINOCULARS_DETECTOR_IMXPAD_S70
103 #num HKL_BINOCULARS_DETECTOR_DECTRIS_EIGER1M
104 #num HKL_BINOCULARS_DETECTOR_UFXC
105 #num HKL_BINOCULARS_DETECTOR_MERLIN
106 #num HKL_BINOCULARS_DETECTOR_MERLIN_MEDIPIX_3RX_QUAD
107 #num HKL_BINOCULARS_DETECTOR_MERLIN_MEDIPIX_3RX_QUAD_512
109 data HklBinocularsDetectorEnum
110 = HklBinocularsDetectorEnum'ImxpadS140
111 | HklBinocularsDetectorEnum'XpadFlatCorrected
112 | HklBinocularsDetectorEnum'ImxpadS70
113 | HklBinocularsDetectorEnum'DectrisEiger1M
114 | HklBinocularsDetectorEnum'Ufxc
115 | HklBinocularsDetectorEnum'Merlin
116 | HklBinocularsDetectorEnum'MerlinMedipix3rxQuad
117 | HklBinocularsDetectorEnum'MerlinMedipix3rxQuad512
118 deriving (Bounded, Eq, Show)
120 instance Enum HklBinocularsDetectorEnum where
122 | n == c'HKL_BINOCULARS_DETECTOR_IMXPAD_S140 = HklBinocularsDetectorEnum'ImxpadS140
123 | n == c'HKL_BINOCULARS_DETECTOR_XPAD_FLAT_CORRECTED = HklBinocularsDetectorEnum'XpadFlatCorrected
124 | n == c'HKL_BINOCULARS_DETECTOR_IMXPAD_S70 = HklBinocularsDetectorEnum'ImxpadS70
125 | n == c'HKL_BINOCULARS_DETECTOR_DECTRIS_EIGER1M = HklBinocularsDetectorEnum'DectrisEiger1M
126 | n == c'HKL_BINOCULARS_DETECTOR_UFXC = HklBinocularsDetectorEnum'Ufxc
127 | n == c'HKL_BINOCULARS_DETECTOR_MERLIN = HklBinocularsDetectorEnum'Merlin
128 | n == c'HKL_BINOCULARS_DETECTOR_MERLIN_MEDIPIX_3RX_QUAD = HklBinocularsDetectorEnum'MerlinMedipix3rxQuad
129 | n == c'HKL_BINOCULARS_DETECTOR_MERLIN_MEDIPIX_3RX_QUAD_512 = HklBinocularsDetectorEnum'MerlinMedipix3rxQuad512
130 | otherwise = error "Non supported Detector type"
132 fromEnum HklBinocularsDetectorEnum'ImxpadS140 = c'HKL_BINOCULARS_DETECTOR_IMXPAD_S140
133 fromEnum HklBinocularsDetectorEnum'XpadFlatCorrected = c'HKL_BINOCULARS_DETECTOR_XPAD_FLAT_CORRECTED
134 fromEnum HklBinocularsDetectorEnum'ImxpadS70 = c'HKL_BINOCULARS_DETECTOR_IMXPAD_S70
135 fromEnum HklBinocularsDetectorEnum'DectrisEiger1M = c'HKL_BINOCULARS_DETECTOR_DECTRIS_EIGER1M
136 fromEnum HklBinocularsDetectorEnum'Ufxc = c'HKL_BINOCULARS_DETECTOR_UFXC
137 fromEnum HklBinocularsDetectorEnum'Merlin = c'HKL_BINOCULARS_DETECTOR_MERLIN
138 fromEnum HklBinocularsDetectorEnum'MerlinMedipix3rxQuad = c'HKL_BINOCULARS_DETECTOR_MERLIN_MEDIPIX_3RX_QUAD
139 fromEnum HklBinocularsDetectorEnum'MerlinMedipix3rxQuad512 = c'HKL_BINOCULARS_DETECTOR_MERLIN_MEDIPIX_3RX_QUAD_512
141 #ccall hkl_binoculars_detector_2d_coordinates_get, <HklBinocularsDetectorEnum> -> IO (Ptr CDouble)
142 #ccall hkl_binoculars_detector_2d_mask_get, <HklBinocularsDetectorEnum> -> IO (Ptr CBool)
143 #ccall hkl_binoculars_detector_2d_mask_load, <HklBinocularsDetectorEnum> -> CString -> IO (Ptr CBool)
144 #ccall hkl_binoculars_detector_2d_name_get, <HklBinocularsDetectorEnum> -> IO CString
145 #ccall hkl_binoculars_detector_2d_number_of_detectors, IO CInt
146 #ccall hkl_binoculars_detector_2d_shape_get, <HklBinocularsDetectorEnum> -> Ptr CInt -> Ptr CInt -> IO ()
147 #ccall hkl_binoculars_detector_2d_sixs_calibration, <HklBinocularsDetectorEnum> -> Ptr CDouble -> CInt -> CInt -> CInt -> CInt -> CDouble -> CDouble -> CInt -> IO ()
153 #integral_t HklBinocularsSurfaceOrientationEnum
155 #num HKL_BINOCULARS_SURFACE_ORIENTATION_VERTICAL
156 #num HKL_BINOCULARS_SURFACE_ORIENTATION_HORIZONTAL
158 data HklBinocularsSurfaceOrientationEnum
159 = HklBinocularsSurfaceOrientationEnum'Vertical
160 | HklBinocularsSurfaceOrientationEnum'Horizontal
161 deriving (Bounded, Eq, Show)
164 instance Enum HklBinocularsSurfaceOrientationEnum where
166 | n == c'HKL_BINOCULARS_SURFACE_ORIENTATION_VERTICAL = HklBinocularsSurfaceOrientationEnum'Vertical
167 | n == c'HKL_BINOCULARS_SURFACE_ORIENTATION_HORIZONTAL = HklBinocularsSurfaceOrientationEnum'Horizontal
168 | otherwise = error "Non supported HklBinocularsSurfaceOrientationEnum value"
170 fromEnum HklBinocularsSurfaceOrientationEnum'Vertical = c'HKL_BINOCULARS_SURFACE_ORIENTATION_VERTICAL
171 fromEnum HklBinocularsSurfaceOrientationEnum'Horizontal = c'HKL_BINOCULARS_SURFACE_ORIENTATION_HORIZONTAL
173 #integral_t HklBinocularsQCustomSubProjectionEnum
175 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QX_QY_QZ
176 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_TTH_TIMESTAMP
177 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_TIMESTAMP
178 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPAR_QPER_TIMESTAMP
179 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPAR_QPER
180 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_PHI_QX
181 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_PHI_QY
182 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_PHI_QZ
183 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_STEREO
184 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_DELTALAB_GAMMALAB_SAMPLEAXIS
185 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_X_Y_Z
186 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Y_Z_TIMESTAMP
187 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_QPAR_QPER
188 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPARS_QPER_TIMESTAMP
189 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPAR_QPER_SAMPLEAXIS
190 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_SAMPLEAXIS_TTH
191 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_SAMPLEAXIS_TIMESTAMP
192 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QX_QY_TIMESTAMP
193 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QX_QZ_TIMESTAMP
194 #num HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QY_QZ_TIMESTAMP
196 data HklBinocularsQCustomSubProjectionEnum
197 = HklBinocularsQCustomSubProjectionEnum'QxQyQz
198 | HklBinocularsQCustomSubProjectionEnum'QTthTimestamp
199 | HklBinocularsQCustomSubProjectionEnum'QTimestamp
200 | HklBinocularsQCustomSubProjectionEnum'QparQperTimestamp
201 | HklBinocularsQCustomSubProjectionEnum'QparQper
202 | HklBinocularsQCustomSubProjectionEnum'QPhiQx
203 | HklBinocularsQCustomSubProjectionEnum'QPhiQy
204 | HklBinocularsQCustomSubProjectionEnum'QPhiQz
205 | HklBinocularsQCustomSubProjectionEnum'QStereo
206 | HklBinocularsQCustomSubProjectionEnum'DeltalabGammalabSampleaxis
207 | HklBinocularsQCustomSubProjectionEnum'XYZ
208 | HklBinocularsQCustomSubProjectionEnum'YZTimestamp
209 | HklBinocularsQCustomSubProjectionEnum'QQparQper
210 | HklBinocularsQCustomSubProjectionEnum'QparsQperTimestamp
211 | HklBinocularsQCustomSubProjectionEnum'QparQperSampleaxis
212 | HklBinocularsQCustomSubProjectionEnum'QSampleaxisTth
213 | HklBinocularsQCustomSubProjectionEnum'QSampleaxisTimestamp
214 | HklBinocularsQCustomSubProjectionEnum'QxQyTimestamp
215 | HklBinocularsQCustomSubProjectionEnum'QxQzTimestamp
216 | HklBinocularsQCustomSubProjectionEnum'QyQzTimestamp
217 deriving (Bounded, Eq, Show)
219 instance Enum HklBinocularsQCustomSubProjectionEnum where
221 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QX_QY_QZ = HklBinocularsQCustomSubProjectionEnum'QxQyQz
222 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_TTH_TIMESTAMP = HklBinocularsQCustomSubProjectionEnum'QTthTimestamp
223 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_TIMESTAMP = HklBinocularsQCustomSubProjectionEnum'QTimestamp
224 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPAR_QPER_TIMESTAMP = HklBinocularsQCustomSubProjectionEnum'QparQperTimestamp
225 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPAR_QPER = HklBinocularsQCustomSubProjectionEnum'QparQper
226 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_PHI_QX = HklBinocularsQCustomSubProjectionEnum'QPhiQx
227 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_PHI_QY = HklBinocularsQCustomSubProjectionEnum'QPhiQy
228 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_PHI_QZ = HklBinocularsQCustomSubProjectionEnum'QPhiQz
229 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_STEREO = HklBinocularsQCustomSubProjectionEnum'QStereo
230 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_DELTALAB_GAMMALAB_SAMPLEAXIS = HklBinocularsQCustomSubProjectionEnum'DeltalabGammalabSampleaxis
231 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_X_Y_Z = HklBinocularsQCustomSubProjectionEnum'XYZ
232 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Y_Z_TIMESTAMP = HklBinocularsQCustomSubProjectionEnum'YZTimestamp
233 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_QPAR_QPER = HklBinocularsQCustomSubProjectionEnum'QQparQper
234 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPARS_QPER_TIMESTAMP = HklBinocularsQCustomSubProjectionEnum'QparsQperTimestamp
235 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPAR_QPER_SAMPLEAXIS = HklBinocularsQCustomSubProjectionEnum'QparQperSampleaxis
236 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_SAMPLEAXIS_TTH = HklBinocularsQCustomSubProjectionEnum'QSampleaxisTth
237 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_SAMPLEAXIS_TIMESTAMP = HklBinocularsQCustomSubProjectionEnum'QSampleaxisTimestamp
238 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QX_QY_TIMESTAMP = HklBinocularsQCustomSubProjectionEnum'QxQyTimestamp
239 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QX_QZ_TIMESTAMP = HklBinocularsQCustomSubProjectionEnum'QxQzTimestamp
240 | n == c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QY_QZ_TIMESTAMP = HklBinocularsQCustomSubProjectionEnum'QyQzTimestamp
241 | otherwise = error "Non supported HklBinocularsQCustomSubProjectionEnum value"
243 fromEnum HklBinocularsQCustomSubProjectionEnum'QxQyQz = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QX_QY_QZ
244 fromEnum HklBinocularsQCustomSubProjectionEnum'QTthTimestamp = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_TTH_TIMESTAMP
245 fromEnum HklBinocularsQCustomSubProjectionEnum'QTimestamp = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_TIMESTAMP
246 fromEnum HklBinocularsQCustomSubProjectionEnum'QparQperTimestamp = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPAR_QPER_TIMESTAMP
247 fromEnum HklBinocularsQCustomSubProjectionEnum'QparQper = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPAR_QPER
248 fromEnum HklBinocularsQCustomSubProjectionEnum'QPhiQx = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_PHI_QX
249 fromEnum HklBinocularsQCustomSubProjectionEnum'QPhiQy = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_PHI_QY
250 fromEnum HklBinocularsQCustomSubProjectionEnum'QPhiQz = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_PHI_QZ
251 fromEnum HklBinocularsQCustomSubProjectionEnum'QStereo = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_STEREO
252 fromEnum HklBinocularsQCustomSubProjectionEnum'DeltalabGammalabSampleaxis = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_DELTALAB_GAMMALAB_SAMPLEAXIS
253 fromEnum HklBinocularsQCustomSubProjectionEnum'XYZ = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_X_Y_Z
254 fromEnum HklBinocularsQCustomSubProjectionEnum'YZTimestamp = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Y_Z_TIMESTAMP
255 fromEnum HklBinocularsQCustomSubProjectionEnum'QQparQper = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_QPAR_QPER
256 fromEnum HklBinocularsQCustomSubProjectionEnum'QparsQperTimestamp = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPARS_QPER_TIMESTAMP
257 fromEnum HklBinocularsQCustomSubProjectionEnum'QparQperSampleaxis = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QPAR_QPER_SAMPLEAXIS
258 fromEnum HklBinocularsQCustomSubProjectionEnum'QSampleaxisTth = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_SAMPLEAXIS_TTH
259 fromEnum HklBinocularsQCustomSubProjectionEnum'QSampleaxisTimestamp = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_Q_SAMPLEAXIS_TIMESTAMP
260 fromEnum HklBinocularsQCustomSubProjectionEnum'QxQyTimestamp = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QX_QY_TIMESTAMP
261 fromEnum HklBinocularsQCustomSubProjectionEnum'QxQzTimestamp = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QX_QZ_TIMESTAMP
262 fromEnum HklBinocularsQCustomSubProjectionEnum'QyQzTimestamp = c'HKL_BINOCULARS_QCUSTOM_SUB_PROJECTION_QY_QZ_TIMESTAMP
264 #opaque_t HklBinocularsSpace
266 #ccall hkl_binoculars_space_new, \
267 CSize -> CSize -> IO (Ptr <HklBinocularsSpace>)
269 #ccall hkl_binoculars_space_free, \
270 Ptr <HklBinocularsSpace> -> IO ()
272 type C'ProjectionTypeAngles t = Ptr C'HklBinocularsSpace -- HklBinocularsSpace *self
273 -> Ptr C'HklGeometry -- const HklGeometry *geometry
274 -> Ptr t -- const uint16_t *image
275 -> CSize -- size_t n_pixels
276 -> CDouble -- double weight
277 -> Ptr Double -- const double *pixels_coordinates
278 -> CSize -- int32_t pixels_coordinates_ndim
279 -> Ptr CSize -- const int32_t *pixels_coordinates_dims
280 -> Ptr Double -- const double *resolutions
281 -> CSize -- size_t n_resolutions
282 -> Ptr CBool -- const uint8_t *mask
283 -> Ptr (Ptr C'HklBinocularsAxisLimits) -- const HklBinocularsAxisLimits
284 -> CSize -- size_t n_limits
285 -> CString -- const char *sample_axis
288 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_angles_int32_t" \
289 c'hkl_binoculars_space_angles_int32_t :: C'ProjectionTypeAngles Int32
291 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_angles_uint16_t" \
292 c'hkl_binoculars_space_angles_uint16_t :: C'ProjectionTypeAngles Word16
294 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_angles_uint32_t" \
295 c'hkl_binoculars_space_angles_uint32_t :: C'ProjectionTypeAngles Word32
298 type C'ProjectionTypeQCustom t = Ptr C'HklBinocularsSpace -- HklBinocularsSpace *self
299 -> Ptr C'HklGeometry -- const HklGeometry *geometry
300 -> Ptr t -- const uint16_t *image
301 -> CSize -- size_t n_pixels
302 -> CDouble -- double weight
303 -> Ptr Double -- const double *pixels_coordinates
304 -> CSize -- int32_t pixels_coordinates_ndim
305 -> Ptr CSize -- const int32_t *pixels_coordinates_dims
306 -> Ptr Double -- const double *resolutions
307 -> CSize -- size_t n_resolutions
308 -> Ptr CBool -- const uint8_t *mask
309 -> C'HklBinocularsSurfaceOrientationEnum -- surface orientation
310 -> Ptr (Ptr C'HklBinocularsAxisLimits) -- const HklBinocularsAxisLimits
311 -> CSize -- size_t n_limits
312 -> CDouble -- double index
313 -> C'HklBinocularsQCustomSubProjectionEnum -- int subprojection
317 -> CString -- const char *sample_axis
318 -> CInt -- int do_polarization_correction
321 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_qcustom_int32_t" \
322 c'hkl_binoculars_space_qcustom_int32_t :: C'ProjectionTypeQCustom Int32
324 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_qcustom_uint16_t" \
325 c'hkl_binoculars_space_qcustom_uint16_t :: C'ProjectionTypeQCustom Word16
327 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_qcustom_uint32_t" \
328 c'hkl_binoculars_space_qcustom_uint32_t :: C'ProjectionTypeQCustom Word32
330 type C'ProjectionTypeHkl t = Ptr C'HklBinocularsSpace -- HklBinocularsSpace *self
331 -> Ptr C'HklGeometry -- const HklGeometry *geometry
332 -> Ptr C'HklSample -- const HklSample *sample
333 -> Ptr t -- const <t> *image
334 -> CSize -- size_t n_pixels
335 -> CDouble -- double weight
336 -> Ptr Double -- const double *pixels_coordinates
337 -> CSize -- size_t pixels_coordinates_ndim
338 -> Ptr CSize -- const int32_t *pixels_coordinates_dims
339 -> Ptr Double -- const double *resolutions
340 -> CSize -- size_t n_resolutions
341 -> Ptr CBool -- const uint8_t *mask
342 -> Ptr (Ptr C'HklBinocularsAxisLimits) -- const HklBinocularsAxisLimits
343 -> CSize -- size_t n_limits
344 -> CInt -- int do_polarization_correction
347 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_hkl_int32_t" \
348 c'hkl_binoculars_space_hkl_int32_t :: C'ProjectionTypeHkl Int32
350 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_hkl_uint16_t" \
351 c'hkl_binoculars_space_hkl_uint16_t :: C'ProjectionTypeHkl Word16
354 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_hkl_uint32_t" \
355 c'hkl_binoculars_space_hkl_uint32_t :: C'ProjectionTypeHkl Word32
359 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_test_int32_t" \
360 c'hkl_binoculars_space_test_int32_t :: C'ProjectionTypeHkl Int32
362 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_test_uint16_t" \
363 c'hkl_binoculars_space_test_uint16_t :: C'ProjectionTypeHkl Word16
365 foreign import ccall unsafe "hkl-binoculars.h hkl_binoculars_space_test_uint32_t" \
366 c'hkl_binoculars_space_test_uint32_t :: C'ProjectionTypeHkl Word32