Main Page | Class List | Directories | File List | Class Members | File Members

ObitImage.h

Go to the documentation of this file.
00001 /* $Id: ObitImage.h,v 1.10 2007/08/31 17:24:48 bcotton Exp $           */
00002 /*--------------------------------------------------------------------*/
00003 /*;  Copyright (C) 2003-2006                                          */
00004 /*;  Associated Universities, Inc. Washington DC, USA.                */
00005 /*;                                                                   */
00006 /*;  This program is free software; you can redistribute it and/or    */
00007 /*;  modify it under the terms of the GNU General Public License as   */
00008 /*;  published by the Free Software Foundation; either version 2 of   */
00009 /*;  the License, or (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        */
00017 /*;  License along with this program; if not, write to the Free       */
00018 /*;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,     */
00019 /*;  MA 02139, USA.                                                   */
00020 /*;                                                                   */
00021 /*;  Correspondence this software should be addressed as follows:     */
00022 /*;         Internet email: bcotton@nrao.edu.                         */
00023 /*;         Postal address: William Cotton                            */
00024 /*;                         National Radio Astronomy Observatory      */
00025 /*;                         520 Edgemont Road                         */
00026 /*;                         Charlottesville, VA 22903-2475 USA        */
00027 /*--------------------------------------------------------------------*/
00028 #ifndef OBITIMAGE_H 
00029 #define OBITIMAGE_H 
00030 
00031 #include "ObitData.h"
00032 #include "ObitImageDesc.h"
00033 #include "ObitImageSel.h"
00034 #include "ObitTableList.h"
00035 #include "ObitFArray.h"
00036 #include "ObitUVGrid.h"
00037 
00038 /*-------- Obit: Software for the recently deceased ------------------*/
00137 /*--------------Class definitions-------------------------------------*/
00139 typedef struct {
00140 #include "ObitImageDef.h"   /* this class definition */
00141 } ObitImage;
00142 
00143 /*----------------- Macroes ---------------------------*/
00149 #define ObitImageUnref(in) ObitUnref ( in)
00150 
00156 #define ObitImageRef(in) ObitRef (in)
00157 
00164 #define ObitImageIsA(in) ObitIsA (in, ObitImageGetClass())
00165 
00178 #define ObitImageSetFITS(in,size,disk,file,blc,trc,err) G_STMT_START{ \
00179        in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1;  \
00180        in->info->dim[3]=1; in->info->dim[4]=1;                      \
00181        in->info->work[0] = OBIT_IO_FITS;                            \
00182        in->info->work[1]= size; in->info->work[2]= disk;            \
00183        ObitInfoListPut (in->info, "FileType", OBIT_int,             \
00184                   in->info->dim, (gpointer)&in->info->work[0], err);\
00185        ObitInfoListPut (in->info, "IOBy", OBIT_int, in->info->dim,  \
00186                  (gpointer)&in->info->work[1], err);                \
00187        in->info->dim[0] = IM_MAXDIM;                                \
00188        ObitInfoListPut (in->info, "BLC", OBIT_int, in->info->dim,   \
00189                  (gpointer)blc, err);                               \
00190        ObitInfoListPut (in->info, "TRC", OBIT_int, in->info->dim,   \
00191                  (gpointer)trc, err);                               \
00192        in->info->dim[0] = 1;                                        \
00193        ObitInfoListPut (in->info, "Disk", OBIT_int,                 \
00194                  in->info->dim, (gpointer)&in->info->work[2], err); \
00195        in->info->dim[0] = strlen(file);                             \
00196        ObitInfoListPut (in->info, "FileName", OBIT_string,          \
00197                  in->info->dim, (gpointer)file, err);               \
00198      }G_STMT_END   
00199 
00213 #define ObitImageSetAIPS(in,size,disk,cno,user,blc,trc,err)  G_STMT_START{  \
00214        in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1;  \
00215        in->info->dim[3]=1; in->info->dim[4]=1;                      \
00216        in->info->work[0] = OBIT_IO_AIPS;                            \
00217        in->info->work[1]= size;                                     \
00218        ObitInfoListPut (in->info, "FileType", OBIT_int,             \
00219                   in->info->dim, (gpointer)&in->info->work[0], err);\
00220        ObitInfoListPut (in->info, "IOBy", OBIT_int, in->info->dim,  \
00221                  (gpointer)&in->info->work[1], err);                \
00222        in->info->dim[0] = IM_MAXDIM;                                \
00223        ObitInfoListPut (in->info, "BLC", OBIT_int, in->info->dim,   \
00224                  (gpointer)blc, err);                               \
00225        ObitInfoListPut (in->info, "TRC", OBIT_int, in->info->dim,   \
00226                  (gpointer)trc, err);                               \
00227        in->info->dim[0] = 1;                                        \
00228        ObitInfoListPut (in->info, "Disk", OBIT_int,                 \
00229                  in->info->dim, (gpointer)&disk, err);              \
00230        ObitInfoListPut (in->info, "CNO", OBIT_int,                  \
00231                  in->info->dim, (gpointer)&cno, err);               \
00232        ObitInfoListPut (in->info, "User", OBIT_int,                 \
00233                  in->info->dim, (gpointer)&user, err);              \
00234      }G_STMT_END   
00235 
00236 
00237 /*---------------Public functions---------------------------*/
00239 void ObitImageClassInit (void);
00240 
00242 ObitImage* newObitImage (gchar* name);
00243 
00245 ObitImage* newObitImageScratch (ObitImage *in, ObitErr *err);
00247 typedef ObitImage* (*newObitImageScratchFP) (ObitImage *in, ObitErr *err);
00248 
00250 void ObitImageFullInstantiate (ObitImage *in, gboolean exist, ObitErr *err);
00251 typedef void (*ObitImageFullInstantiateFP) (ObitImage *in, gboolean exist, 
00252                                             ObitErr *err);
00253 
00255 gconstpointer ObitImageGetClass (void);
00256 
00258 void ObitImageRename  (ObitImage *in, ObitErr *err);
00259 
00261 ObitImage* ObitImageZap  (ObitImage *in, ObitErr *err);
00262 
00264 void ObitImageRename  (ObitImage *in, ObitErr *err);
00265 
00267 ObitImage* ObitImageCopy  (ObitImage *in, ObitImage *out, 
00268                            ObitErr *err);
00269 
00271 void ObitImageClone (ObitImage *in, ObitImage *out, ObitErr *err);
00272 
00274 void ObitImageClone2 (ObitImage *in1, ObitImage *in2, ObitImage *out, 
00275                       ObitErr *err);
00276 
00278 gboolean ObitImageSame (ObitImage *in1, ObitImage *in2, ObitErr *err );
00279 typedef gboolean (*ObitImageSameFP) (ObitImage *in1, ObitImage *in2, 
00280                                   ObitErr *err);
00281 
00283 void ObitImageCloneMem (ObitImage *in, ObitImage *out, ObitErr *err);
00284 
00286 ObitIOCode ObitImageOpen (ObitImage *in, ObitIOAccess access, 
00287                           ObitErr *err);
00288 
00290 ObitIOCode ObitImageClose (ObitImage *in, ObitErr *err);
00291 
00293 ObitIOCode ObitImageRead (ObitImage *in, gfloat *data, ObitErr *err);
00294 
00296 ObitIOCode ObitImageWrite (ObitImage *in, gfloat *data, ObitErr *err);
00297 
00299 ObitIOCode ObitImageGetPlane (ObitImage *in, gfloat *data, gint plane[5], ObitErr *err);
00300 typedef ObitIOCode (*ObitImageGetPlaneFP) (ObitImage *in, gfloat *data, 
00301                                            gint plane[5], ObitErr *err);
00302 
00304 ObitIOCode ObitImagePutPlane (ObitImage *in, gfloat *data, gint plane[5], ObitErr *err);
00305 typedef ObitIOCode (*ObitImagePutPlaneFP) (ObitImage *in, gfloat *data, 
00306                                            gint plane[5], ObitErr *err);
00307 
00309 ObitTable* newObitImageTable (ObitImage *in, ObitIOAccess access, 
00310                               gchar *tabType, glong *tabver, ObitErr *err);
00311 typedef ObitTable* (*newObitImageTableFP) (ObitImage *in, ObitIOAccess access, 
00312                                            gchar *tabType, glong *tabver, 
00313                                            ObitErr *err);
00314 
00316 ObitIOCode ObitImageZapTable (ObitImage *in, gchar *tabType, glong tabVer, 
00317                            ObitErr *err);
00318 typedef ObitIOCode (*ObitImageZapTableFP) (ObitImage *in, gchar *tabType, 
00319                                         glong tabVer, ObitErr *err);
00320 
00322 ObitIOCode ObitImageCopyTables (ObitImage *in, ObitImage *out, gchar **exclude,
00323                              gchar **include, ObitErr *err);
00324 typedef ObitIOCode (*ObitImageCopyTablesFP) (ObitImage *in, ObitImage *out, 
00325                                               gchar **exclude, gchar **include, 
00326                                               ObitErr *err);
00327 
00329 ObitIOCode ObitImageUpdateTables (ObitImage *in, ObitErr *err);
00330 typedef ObitIOCode (*ObitImageUpdateTablesFP) (ObitImage *in, ObitErr *err);
00331 
00333 void ObitImageSetBeamName (ObitImage *image, ObitErr *err);
00334 typedef void (*ObitImageSetBeamNameFP) (ObitImage *in, ObitErr *err);
00335 
00337 void ObitImageWriteKeyword (ObitImage *in, 
00338                             gchar* name, ObitInfoType type, gint32 *dim, 
00339                             gconstpointer data, ObitErr *err);
00341 void ObitImageReadKeyword (ObitImage *in, 
00342                            gchar* name, ObitInfoType *type, gint32 *dim, 
00343                            gpointer data, ObitErr *err);
00344 /*----------- ClassInfo Structure -----------------------------------*/
00345 
00351 typedef struct  {
00352 #include "ObitImageClassDef.h"
00353 } ObitImageClassInfo; 
00354 
00355 #endif /* OBITIMAGE_H */ 

Generated on Fri Aug 31 22:13:04 2007 for Obit by  doxygen 1.3.9.1