irplib_access.c

00001 /* $Id: irplib_access.c,v 1.2 2006/11/15 14:04:08 jmlarsen Exp $
00002  *
00003  * This file is part of the irplib package
00004  * Copyright (C) 2002,2003 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: jmlarsen $
00023  * $Date: 2006/11/15 14:04:08 $
00024  * $Revision: 1.2 $
00025  * $Name:  $
00026  */
00027 
00028 #ifdef HAVE_CONFIG_H
00029 #include <config.h>
00030 #endif
00031 
00032 /*-----------------------------------------------------------------------------
00033                                    Includes
00034  -----------------------------------------------------------------------------*/
00035 
00036 #include <irplib_access.h>
00037 
00038 #include <cpl.h>
00039 
00040 /*-----------------------------------------------------------------------------
00041                             Functions implementation
00042  -----------------------------------------------------------------------------*/
00043 
00044 /*----------------------------------------------------------------------------*/
00049 /*----------------------------------------------------------------------------*/
00050 
00064 /* Accessor functions */
00065 
00066 cpl_vector *irplib_bivector_get_x      (      cpl_bivector *in) 
00067 {
00068     return cpl_bivector_get_x(in); 
00069 }
00070 
00071 const cpl_vector *irplib_bivector_get_x_const(const cpl_bivector *in)
00072 {
00073     return cpl_bivector_get_x(in); 
00074 }
00075 
00076 cpl_vector *irplib_bivector_get_y      (      cpl_bivector *in)
00077 {
00078     return cpl_bivector_get_y(in);
00079 }
00080 
00081 const cpl_vector *irplib_bivector_get_y_const(const cpl_bivector *in)
00082 {
00083     return cpl_bivector_get_y(in);
00084 }
00085 
00086 double *irplib_bivector_get_x_data      (      cpl_bivector *in)
00087 {
00088     return cpl_bivector_get_x_data(in);
00089 }
00090 
00091 const double *irplib_bivector_get_x_data_const(const cpl_bivector *in)
00092 {
00093     return cpl_bivector_get_x_data(in);
00094 }
00095 
00096 double *irplib_bivector_get_y_data      (      cpl_bivector *in)
00097 {
00098     return cpl_bivector_get_y_data(in);
00099 }
00100 
00101 const double *irplib_bivector_get_y_data_const(const cpl_bivector *in)
00102 {
00103     return cpl_bivector_get_y_data(in);
00104 }
00105 
00106 cpl_mask *irplib_image_get_bpm      (      cpl_image *img)
00107 {
00108     return cpl_image_get_bpm(img);
00109 }
00110 
00111 const cpl_mask *irplib_image_get_bpm_const(const cpl_image *img)
00112 {
00113     return cpl_image_get_bpm(img);
00114 }
00115 
00116 void *irplib_image_get_data      (      cpl_image *img)
00117 {
00118     return cpl_image_get_data(img);
00119 }
00120 
00121 const void *irplib_image_get_data_const(const cpl_image *img)
00122 {
00123     return cpl_image_get_data(img);
00124 }
00125 
00126 double *irplib_image_get_data_double      (      cpl_image *img)
00127 {
00128     return cpl_image_get_data_double(img);
00129 }
00130 
00131 const double *irplib_image_get_data_double_const(const cpl_image *img)
00132 {
00133     return cpl_image_get_data_double(img);
00134 }
00135 
00136 float *irplib_image_get_data_float      (      cpl_image *img)
00137 {
00138     return cpl_image_get_data_float(img);
00139 }
00140 
00141 const float *irplib_image_get_data_float_const(const cpl_image *img)
00142 {
00143     return cpl_image_get_data_float(img);
00144 }
00145 
00146 int *irplib_image_get_data_int      (      cpl_image *img)
00147 {
00148     return cpl_image_get_data_int(img);
00149 }
00150 
00151 const int *irplib_image_get_data_int_const(const cpl_image *img)
00152 {
00153     return cpl_image_get_data_int(img);
00154 }
00155 
00156 cpl_image *irplib_imagelist_get      (      cpl_imagelist *imlist,
00157                         int inum)
00158 {
00159     return cpl_imagelist_get(imlist, inum);
00160 }
00161 
00162 const cpl_image *irplib_imagelist_get_const(const cpl_imagelist *imlist, 
00163                         int inum)
00164 {
00165     return cpl_imagelist_get(imlist, inum);
00166 }
00167 
00168 cpl_binary *irplib_mask_get_data      (      cpl_mask *in)
00169 {
00170     return cpl_mask_get_data(in);
00171 }
00172 
00173 const cpl_binary *irplib_mask_get_data_const(const cpl_mask *in)
00174 {
00175     return cpl_mask_get_data(in);
00176 }
00177 
00178 double *irplib_matrix_get_data      (      cpl_matrix *matrix)
00179 {
00180     return cpl_matrix_get_data(matrix);
00181 }
00182 
00183 const double *irplib_matrix_get_data_const(const cpl_matrix *matrix)
00184 {
00185     return cpl_matrix_get_data(matrix);
00186 }
00187 
00188 cpl_array      **irplib_table_get_data_array(      cpl_table *table,
00189                            const char *name)
00190 {
00191     return cpl_table_get_data_array(table, name);
00192 }
00193 
00194 const cpl_array *const*irplib_table_get_data_array_const(const cpl_table *table,
00195                              const char *name)
00196 {
00197     return (const cpl_array *const*)cpl_table_get_data_array(table, name);
00198 }
00199 
00200 int *irplib_table_get_data_int      (      cpl_table *table, 
00201                        const char *name)
00202 {
00203     return cpl_table_get_data_int(table, name);
00204 }
00205 
00206 const int *irplib_table_get_data_int_const(const cpl_table *table, 
00207                        const char *name)
00208 {
00209     return cpl_table_get_data_int(table, name);
00210 }
00211 
00212 float *irplib_table_get_data_float      (      cpl_table *table, 
00213                            const char *name)
00214 {
00215     return cpl_table_get_data_float(table, name);
00216 }
00217 
00218 const float *irplib_table_get_data_float_const(const cpl_table *table, 
00219                            const char *name)
00220 {
00221     return cpl_table_get_data_float(table, name);
00222 }
00223 
00224 double *irplib_table_get_data_double      (      cpl_table *table, 
00225                          const char *name)
00226 {
00227     return cpl_table_get_data_double      (table, 
00228                        name);
00229 }
00230 
00231 const double *irplib_table_get_data_double_const(const cpl_table *table, 
00232                          const char *name)
00233 {
00234     return cpl_table_get_data_double(table, 
00235                      name);
00236 }
00237 
00238 cpl_array *irplib_table_get_array      (      cpl_table *table, 
00239                           const char *name, int row)
00240 {
00241     return (cpl_array *)cpl_table_get_array(table, name, row);
00242 }
00243 
00244 const cpl_array *irplib_table_get_array_const(const cpl_table *table, 
00245                           const char *name, int row)
00246 {
00247     return cpl_table_get_array(table, name, row);
00248 }
00249 
00250 char      **irplib_table_get_data_string(      cpl_table *table, 
00251                            const char *name)
00252 {
00253     return cpl_table_get_data_string(table, name);
00254 }
00255 
00256 const char *const*irplib_table_get_data_string_const(const cpl_table *table,
00257                              const char *name)
00258 {
00259     return (const char *const*)cpl_table_get_data_string(table, name);
00260 }
00261 
00262 double *irplib_vector_get_data      (      cpl_vector *in)
00263 {
00264     return cpl_vector_get_data      (in);
00265 }
00266 
00267 const double *irplib_vector_get_data_const(const cpl_vector *in)
00268 {
00269     return cpl_vector_get_data(in);
00270 }
00271 
00272 cpl_frame *irplib_frameset_find      (      cpl_frameset *self, 
00273                         const char *tag)
00274 {
00275     return cpl_frameset_find      (self, tag);
00276 }
00277 
00278 const cpl_frame *irplib_frameset_find_const(const cpl_frameset *self, 
00279                         const char *tag)
00280 {
00281     return cpl_frameset_find(self, tag);
00282 }
00283 
00284 cpl_frame *irplib_frameset_get_first      (      cpl_frameset *self)
00285 {
00286     return cpl_frameset_get_first(self);
00287 }
00288 
00289 const cpl_frame *irplib_frameset_get_first_const(const cpl_frameset *self)
00290 {
00291     return cpl_frameset_get_first(self);
00292 }
00293 
00294 cpl_frame *irplib_frameset_get_next      (      cpl_frameset *self)
00295 {
00296     return cpl_frameset_get_next(self);
00297 }
00298 
00299 const cpl_frame *irplib_frameset_get_next_const(const cpl_frameset *self)
00300 {
00301     return cpl_frameset_get_next(self);
00302 }
00303 
00304 cpl_frame *irplib_frameset_get_frame      (      cpl_frameset *set, 
00305                          int position)
00306 {
00307     return cpl_frameset_get_frame      (set, position);
00308 }
00309 const cpl_frame *irplib_frameset_get_frame_const(const cpl_frameset *set, 
00310                          int position)
00311 {
00312     return cpl_frameset_get_frame(set, position);
00313 }
00314 
00315 cpl_property *irplib_propertylist_get      (      cpl_propertylist *self,
00316                           long position)
00317 {
00318     return cpl_propertylist_get      (self, position);
00319 }
00320 
00321 const cpl_property *irplib_propertylist_get_const(const cpl_propertylist *self,
00322                           long position)
00323 {
00324     return cpl_propertylist_get(self, position);
00325 }
00326 
00327 const cpl_parameter *
00328 irplib_parameterlist_get_first_const(const cpl_parameterlist *self)
00329 {
00330     return cpl_parameterlist_get_first((cpl_parameterlist *)self);
00331 }
00332 
00333 const cpl_parameter *
00334 irplib_parameterlist_get_next_const(const cpl_parameterlist *self)
00335 {
00336     return cpl_parameterlist_get_next((cpl_parameterlist *)self);
00337 }
00338 
00339 const cpl_parameter *
00340 irplib_parameterlist_get_last_const(const cpl_parameterlist *self)
00341 {
00342     return cpl_parameterlist_get_last((cpl_parameterlist *)self);
00343 }
00344 
00345 const cpl_parameter *
00346 irplib_parameterlist_find_const(const cpl_parameterlist *self,
00347                 const char *name)
00348 {
00349     return cpl_parameterlist_find((cpl_parameterlist *)self, name);
00350 }
00351 
00352 const cpl_parameter *
00353 irplib_parameterlist_find_type_const(const cpl_parameterlist *self,
00354                      cpl_type type)
00355 {
00356     return cpl_parameterlist_find_type((cpl_parameterlist *)self, type);
00357 }
00358 
00359 const cpl_parameter *
00360 irplib_parameterlist_find_context_const(const cpl_parameterlist *self,
00361                     const char *context)
00362 {
00363     return cpl_parameterlist_find_context((cpl_parameterlist *)self, context);
00364 }
00365 
00366 const cpl_parameter *
00367 irplib_parameterlist_find_tag_const(const cpl_parameterlist *self,
00368                     const char *tag)
00369 {
00370     return cpl_parameterlist_find_tag((cpl_parameterlist *)self, tag);
00371 }
00372 
00373 const cpl_plugin *irplib_pluginlist_get_first_const(const cpl_pluginlist *self)
00374 {
00375     return cpl_pluginlist_get_first((cpl_pluginlist *)self);
00376 }
00377 
00378 const cpl_plugin *irplib_pluginlist_get_next_const(const cpl_pluginlist *self)
00379 {
00380     return cpl_pluginlist_get_next((cpl_pluginlist *)self);
00381 }
00382 
00383 const cpl_plugin *irplib_pluginlist_get_last_const(const cpl_pluginlist *self)
00384 {
00385     return cpl_pluginlist_get_last((cpl_pluginlist *)self);
00386 }
00387 
00388 const cpl_plugin *irplib_pluginlist_find_const(const cpl_pluginlist *self, 
00389                            const char *name)
00390 {
00391     return cpl_pluginlist_find((cpl_pluginlist *)self, name);
00392 }
00393 
00394 int *irplib_array_get_data_int      (      cpl_array *array)
00395 {
00396     return cpl_array_get_data_int      (array);
00397 }
00398 
00399 const int *irplib_array_get_data_int_const(const cpl_array *array)
00400 {
00401     return cpl_array_get_data_int(array);
00402 }
00403 
00404 float *irplib_array_get_data_float      (      cpl_array *array)
00405 {
00406     return cpl_array_get_data_float      (array);
00407 }
00408 
00409 const float *irplib_array_get_data_float_const(const cpl_array *array)
00410 {
00411     return cpl_array_get_data_float(array);
00412 }
00413 
00414 double *irplib_array_get_data_double      (      cpl_array *array)
00415 {
00416     return cpl_array_get_data_double      (array);
00417 }
00418 
00419 const double *irplib_array_get_data_double_const(const cpl_array *array)
00420 {
00421     return cpl_array_get_data_double(array);
00422 }
00423 
00424 char       **irplib_array_get_data_string      (      cpl_array *array)
00425 {
00426     return cpl_array_get_data_string      (array);
00427 }
00428 
00429 const char *const*irplib_array_get_data_string_const(const cpl_array *array)
00430 {
00431     return (const char * const*) cpl_array_get_data_string(array);
00432 }
00433 
00434 /* Wrappers / unwrappers */
00435 
00436 const cpl_array *irplib_array_wrap_double_const(const double *data,
00437                         int length)
00438 {
00439     return cpl_array_wrap_double((double *)data, length);
00440 }
00441 
00442 const cpl_array *irplib_array_wrap_float_const(const float *data,
00443                            int length)
00444 {
00445     return cpl_array_wrap_float((float *)data, length);
00446 }
00447 
00448 const cpl_array *irplib_array_wrap_int_const(const int *data,
00449                          int length)
00450 {
00451     return cpl_array_wrap_int((int *)data, length);
00452 }
00453 
00454 const cpl_array *irplib_array_wrap_string_const(const char *const*data,
00455                         int length)
00456 {
00457     return cpl_array_wrap_string((char **)data, length);
00458 }
00459 
00460 const void *irplib_array_unwrap_const(const cpl_array *array)
00461 {
00462     return cpl_array_unwrap((cpl_array *)array);
00463 }
00464 
00465 const cpl_bivector *irplib_bivector_wrap_vectors_const(const cpl_vector *x,
00466                                const cpl_vector *y)
00467 {
00468     return cpl_bivector_wrap_vectors((cpl_vector *)x,
00469                      (cpl_vector *)y);
00470 }
00471 
00472 const void *irplib_image_unwrap_const(const cpl_image *d)
00473 {
00474     return cpl_image_unwrap((cpl_image *)d);
00475 }
00476 
00477 cpl_image *irplib_image_wrap_double(int nx,
00478                     int ny,
00479                     double *pixels)
00480 {
00481     return cpl_image_wrap_double(nx, ny, pixels);
00482 }
00483 
00484 const cpl_image *irplib_image_wrap_double_const(int nx,
00485                         int ny,
00486                         const double *pixels)
00487 {
00488     return cpl_image_wrap_double(nx, ny, pixels);
00489 }
00490 
00491 cpl_image *irplib_image_wrap_float(int nx,
00492                    int ny,
00493                    float *pixels)
00494 {
00495     return cpl_image_wrap_float(nx, ny, pixels);
00496 }
00497 
00498 const cpl_image *irplib_image_wrap_float_const(int nx,
00499                            int ny,
00500                            const float *pixels)
00501 {
00502     return cpl_image_wrap_float(nx, ny, pixels);
00503 }
00504 
00505 cpl_image *irplib_image_wrap_int(int nx,
00506                  int ny,
00507                  int *pixels)
00508 {
00509     return cpl_image_wrap_int(nx, ny, pixels);
00510 }
00511 
00512 const cpl_image *irplib_image_wrap_int_const(int nx,
00513                          int ny,
00514                          const int *pixels)
00515 {
00516     return cpl_image_wrap_int(nx, ny, pixels);
00517 }
00518 
00519 const cpl_matrix *irplib_matrix_wrap_const(int rows,
00520                        int columns,
00521                        const double *data)
00522 {
00523     return cpl_matrix_wrap(rows, columns, (double *)data);
00524 }
00525 
00526 const void *irplib_matrix_unwrap_const(const cpl_matrix *matrix)
00527 {
00528     return cpl_matrix_unwrap((cpl_matrix *)matrix);
00529 }
00530 
00531 const cpl_vector *irplib_vector_wrap_const(int n,
00532                        const double *data)
00533 {
00534     return cpl_vector_wrap(n, (double *)data);
00535 }
00536 
00537 const void *irplib_vector_unwrap_const(const cpl_vector *v)
00538 {
00539     return cpl_vector_unwrap((cpl_vector *)v);
00540 }
00541 
00542 /* Deallocators */
00543 
00544 void irplib_apertures_delete(const cpl_apertures *apert)
00545 {
00546     cpl_apertures_delete((cpl_apertures *)apert); 
00547 }
00548 
00549 void irplib_array_delete(const cpl_array *array)
00550 { 
00551     cpl_array_delete((cpl_array *)array);
00552 }
00553  
00554 void irplib_bivector_delete(const cpl_bivector *f)
00555 { 
00556     cpl_bivector_delete((cpl_bivector *)f);
00557 }
00558  
00559 void irplib_frame_delete(const cpl_frame *self)
00560 { 
00561     cpl_frame_delete((cpl_frame *)self);
00562 }
00563  
00564 void irplib_frameset_delete(const cpl_frameset *self)
00565 { 
00566     cpl_frameset_delete((cpl_frameset *)self);
00567 }
00568  
00569 void irplib_image_delete(const cpl_image *d)
00570 { 
00571     cpl_image_delete((cpl_image *)d);
00572 }
00573  
00574 void irplib_imagelist_delete(const cpl_imagelist *imlist)
00575 { 
00576     cpl_imagelist_delete((cpl_imagelist *)imlist);
00577 }
00578  
00579 void irplib_mask_delete(const cpl_mask *m)
00580 { 
00581     cpl_mask_delete((cpl_mask *)m);
00582 }
00583  
00584 void irplib_matrix_delete(const cpl_matrix *matrix)
00585 {
00586     cpl_matrix_delete((cpl_matrix *)matrix);
00587 }
00588 
00589 void irplib_parameter_delete(const cpl_parameter *self)
00590 { 
00591     cpl_parameter_delete((cpl_parameter *)self);
00592 }
00593  
00594 void irplib_parameterlist_delete(const cpl_parameterlist *self)
00595 { 
00596     cpl_parameterlist_delete((cpl_parameterlist *)self);
00597 }
00598  
00599 void irplib_plugin_delete(const cpl_plugin *self)
00600 { 
00601     cpl_plugin_delete((cpl_plugin *)self);
00602 }
00603  
00604 void irplib_pluginlist_delete(const cpl_pluginlist *self)
00605 { 
00606     cpl_pluginlist_delete((cpl_pluginlist *)self);
00607 }
00608  
00609 void irplib_polynomial_delete(const cpl_polynomial *p)
00610 {   
00611     cpl_polynomial_delete((cpl_polynomial *)p);
00612 }
00613    
00614 void irplib_property_delete(const cpl_property *self)
00615 {   
00616     cpl_property_delete((cpl_property *)self);
00617 }
00618    
00619 void irplib_propertylist_delete(const cpl_propertylist *self)
00620 { 
00621     cpl_propertylist_delete((cpl_propertylist *)self);
00622 }
00623  
00624 void irplib_stats_delete(const cpl_stats *stats)
00625 { 
00626     cpl_stats_delete((cpl_stats *)stats);
00627 }
00628  
00629 void irplib_table_delete(const cpl_table *table)
00630 { 
00631     cpl_table_delete((cpl_table *)table);
00632 }
00633  
00634 void irplib_vector_delete(const cpl_vector *v)
00635 { 
00636     cpl_vector_delete((cpl_vector *)v);
00637 }
00638  
00639 void irplib_free(const void *memblk)
00640 {
00641     cpl_free((void *)memblk);
00642 }
00643 

Generated on Wed Jan 17 08:33:41 2007 for SINFONI Pipeline Reference Manual by  doxygen 1.4.4