SIRF  3.4.0
csirf.h
1 /*
2 SyneRBI Synergistic Image Reconstruction Framework (SIRF)
3 Copyright 2015 - 2020 Rutherford Appleton Laboratory STFC
4 Copyright 2018 - 2020 University College London.
5 
6 This is software developed for the Collaborative Computational
7 Project in Synergistic Reconstruction for Biomedical Imaging (formerly CCP PETMR)
8 (http://www.ccpsynerbi.ac.uk/).
9 
10 Licensed under the Apache License, Version 2.0 (the "License");
11 you may not use this file except in compliance with the License.
12 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 */
20 
21 #ifndef cSIRF_INTERFACE
22 #define cSIRF_INTERFACE
23 
24 #ifndef CSIRF_FOR_MATLAB
25 #define PTR_INT size_t
26 #define PTR_FLOAT size_t
27 #define PTR_DOUBLE size_t
28 extern "C" {
29 #else
30 #define PTR_INT int*
31 #define PTR_FLOAT float*
32 #define PTR_DOUBLE double*
33 #endif
34 
35 // New SIRF objects
36 void* cSIRF_newObject(const char* name);
37 
38 // Data container methods
39 void* cSIRF_dataItems(const void* ptr_x);
40 void* cSIRF_isComplex(const void* ptr_x);
41 void* cSIRF_conjugate(void* ptr);
42 void* cSIRF_conjugated(void* ptr);
43 void* cSIRF_norm(const void* ptr_x);
44 void* cSIRF_dot(const void* ptr_x, const void* ptr_y);
45 void* cSIRF_axpby(const PTR_FLOAT ptr_a, const void* ptr_x,
46  const PTR_FLOAT ptr_b, const void* ptr_y);
47 void* cSIRF_axpbyAlt(const PTR_FLOAT ptr_a, const void* ptr_x,
48  const PTR_FLOAT ptr_b, const void* ptr_y, void* ptr_z);
49 void* cSIRF_xapyb(
50  const void* ptr_x, const void* ptr_a,
51  const void* ptr_y, const void* ptr_b);
52 void* cSIRF_xapybAlt(
53  const void* ptr_x, const void* ptr_a,
54  const void* ptr_y, const void* ptr_b,
55  void* ptr_z);
56 void* cSIRF_multiply(const void* ptr_x, const void* ptr_y, const void* ptr_z);
57 void* cSIRF_product(const void* ptr_x, const void* ptr_y);
58 void* cSIRF_divide(const void* ptr_x, const void* ptr_y, const void* ptr_z);
59 void* cSIRF_ratio(const void* ptr_x, const void* ptr_y);
60 void* cSIRF_write(const void* ptr, const char* filename);
61 void* cSIRF_clone(void* ptr_x);
62 
63 // ImageData
64 void* cSIRF_fillImageFromImage(void* ptr_im, const void* ptr_src);
65 void* cSIRF_readImageData(const char* file, const char* eng, int verb);
66 void* cSIRF_equalImages(const void* ptr_im_a, const void* ptr_im_b);
67 void* cSIRF_ImageData_reorient(void* im_ptr, void *geom_info_ptr);
68 
69 // DataHandleVector methods
70 void* cSIRF_DataHandleVector_push_back(void* self, void* to_append);
71 
72 // Geom info
73 void* cSIRF_ImageData_get_geom_info(const void* ptr_geom);
74 void* cSIRF_GeomInfo_get(const void* ptr_geom);
75 void* cSIRF_GeomInfo_get_offset(const void* ptr_geom, PTR_FLOAT ptr_arr);
76 void* cSIRF_GeomInfo_get_spacing(const void* ptr_geom, PTR_FLOAT ptr_arr);
77 void* cSIRF_GeomInfo_get_size(const void* ptr_geom, PTR_INT ptr_arr);
78 void* cSIRF_GeomInfo_get_direction_matrix(const void* ptr_geom, PTR_FLOAT ptr_arr);
79 void* cSIRF_GeomInfo_get_index_to_physical_point_matrix(const void* ptr_geom, PTR_FLOAT ptr_arr);
80 
81 #ifndef CSIRF_FOR_MATLAB
82 }
83 #endif
84 
85 #endif