#include "ObitData.h"
#include "ObitImageDesc.h"
#include "ObitImageSel.h"
#include "ObitTableList.h"
#include "ObitFArray.h"
#include "ObitUVGrid.h"
#include "ObitDef.h"
#include "ObitDataDef.h"
#include "ObitClassDef.h"
#include "ObitDataClassDef.h"
Go to the source code of this file.
Classes | |
| struct | ObitImage |
| ObitImage Class structure. More... | |
| struct | ObitImageClassInfo |
| ClassInfo Structure. More... | |
Defines | |
| #define | ObitImageUnref(in) ObitUnref ( in) |
| Macro to unreference (and possibly destroy) an ObitImage returns a ObitImage*. | |
| #define | ObitImageRef(in) ObitRef (in) |
| Macro to reference (update reference count) an ObitImage. | |
| #define | ObitImageIsA(in) ObitIsA (in, ObitImageGetClass()) |
| Macro to determine if an object is the member of this or a derived class. | |
| #define | ObitImageSetFITS(in, size, disk, file, blc, trc, err) |
| Convenience Macro to define Image I/O to a FITS file. | |
| #define | ObitImageSetAIPS(in, size, disk, cno, user, blc, trc, err) |
| Convenience Macro to define Image I/O to an AIPS file. | |
Typedefs | |
| typedef ObitImage *(* | newObitImageScratchFP )(ObitImage *in, ObitErr *err) |
| Typedef for definition of class pointer structure. | |
| typedef void(* | ObitImageFullInstantiateFP )(ObitImage *in, gboolean exist, ObitErr *err) |
| typedef gboolean(* | ObitImageSameFP )(ObitImage *in1, ObitImage *in2, ObitErr *err) |
| typedef ObitIOCode(* | ObitImageGetPlaneFP )(ObitImage *in, gfloat *data, gint plane[5], ObitErr *err) |
| typedef ObitIOCode(* | ObitImagePutPlaneFP )(ObitImage *in, gfloat *data, gint plane[5], ObitErr *err) |
| typedef ObitTable *(* | newObitImageTableFP )(ObitImage *in, ObitIOAccess access, gchar *tabType, glong *tabver, ObitErr *err) |
| typedef ObitIOCode(* | ObitImageZapTableFP )(ObitImage *in, gchar *tabType, glong tabVer, ObitErr *err) |
| typedef ObitIOCode(* | ObitImageCopyTablesFP )(ObitImage *in, ObitImage *out, gchar **exclude, gchar **include, ObitErr *err) |
| typedef ObitIOCode(* | ObitImageUpdateTablesFP )(ObitImage *in, ObitErr *err) |
| typedef void(* | ObitImageSetBeamNameFP )(ObitImage *in, ObitErr *err) |
Functions | |
| void | ObitImageClassInit (void) |
| Public: Class initializer. | |
| ObitImage * | newObitImage (gchar *name) |
| Public: Constructor. | |
| ObitImage * | newObitImageScratch (ObitImage *in, ObitErr *err) |
| Public: Copy Constructor for scratch file. | |
| void | ObitImageFullInstantiate (ObitImage *in, gboolean exist, ObitErr *err) |
| Public: Fully instantiate. | |
| gconstpointer | ObitImageGetClass (void) |
| Public: ClassInfo pointer. | |
| void | ObitImageRename (ObitImage *in, ObitErr *err) |
| Public: Rename underlying structures. | |
| ObitImage * | ObitImageZap (ObitImage *in, ObitErr *err) |
| Public: Delete underlying structures. | |
| ObitImage * | ObitImageCopy (ObitImage *in, ObitImage *out, ObitErr *err) |
| Public: Copy (deep) constructor. | |
| void | ObitImageClone (ObitImage *in, ObitImage *out, ObitErr *err) |
| Public: Copy structure. | |
| void | ObitImageClone2 (ObitImage *in1, ObitImage *in2, ObitImage *out, ObitErr *err) |
| Public: Copy structure of in1 on grid of in2. | |
| gboolean | ObitImageSame (ObitImage *in1, ObitImage *in2, ObitErr *err) |
| Public: Do two Imagess have the same underlying structures?. | |
| void | ObitImageCloneMem (ObitImage *in, ObitImage *out, ObitErr *err) |
| Public: Copy structure of in to memory resident Image out. | |
| ObitIOCode | ObitImageOpen (ObitImage *in, ObitIOAccess access, ObitErr *err) |
| Public: Create ObitIO structures and open file. | |
| ObitIOCode | ObitImageClose (ObitImage *in, ObitErr *err) |
| Public: Close file and become inactive. | |
| ObitIOCode | ObitImageRead (ObitImage *in, gfloat *data, ObitErr *err) |
| Public: Read specified data. | |
| ObitIOCode | ObitImageWrite (ObitImage *in, gfloat *data, ObitErr *err) |
| Public: Write specified data. | |
| ObitIOCode | ObitImageGetPlane (ObitImage *in, gfloat *data, gint plane[5], ObitErr *err) |
| Public: Read specified image plane. | |
| ObitIOCode | ObitImagePutPlane (ObitImage *in, gfloat *data, gint plane[5], ObitErr *err) |
| Public: Write specified image plane. | |
| ObitTable * | newObitImageTable (ObitImage *in, ObitIOAccess access, gchar *tabType, glong *tabver, ObitErr *err) |
| Public: Return an associated Table. | |
| ObitIOCode | ObitImageZapTable (ObitImage *in, gchar *tabType, glong tabVer, ObitErr *err) |
| Public: Destroy an associated Table. | |
| ObitIOCode | ObitImageCopyTables (ObitImage *in, ObitImage *out, gchar **exclude, gchar **include, ObitErr *err) |
| Public: Copy associated Tables. | |
| ObitIOCode | ObitImageUpdateTables (ObitImage *in, ObitErr *err) |
| Public: Update disk resident tables information. | |
| void | ObitImageSetBeamName (ObitImage *image, ObitErr *err) |
| Public: Set name etc for a beam associated with an image. | |
| void | ObitImageWriteKeyword (ObitImage *in, gchar *name, ObitInfoType type, gint32 *dim, gconstpointer data, ObitErr *err) |
| Public: Write header keyword. | |
| void | ObitImageReadKeyword (ObitImage *in, gchar *name, ObitInfoType *type, gint32 *dim, gpointer data, ObitErr *err) |
| Public: Read header keyword. | |
This class is derived from the ObitData class. Related functions are in the ObitImageUtil , ObitConvUtil and ObitFeatherUtil modules.
This class contains an astronomical image and allows access. An ObitImage is the front end to a persistent disk resident structure. Magic value blanking is supported, blanked pixels have the value returned by ObitMagicF(). There may be associated tables (e.g. "AIPS CC" tables). These associated tables are listed in an ObitTableList member and the newObitUVTable function allows access to these tables. Both FITS and AIPS cataloged images are supported.
A copy of a pointer to an ObitImage should always be made using the ObitImageRef function which updates the reference count in the object. Then whenever freeing an ObitImage or changing a pointer, the function ObitImageUnref will decrement the reference count and destroy the object when the reference count hits 0.
|
|
Macro to determine if an object is the member of this or a derived class. Returns TRUE if a member, else FALSE in = object to reference |
|
|
Macro to reference (update reference count) an ObitImage. returns a ObitImage*. in = object to reference |
|
|
Value: G_STMT_START{ \
in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1; \
in->info->dim[3]=1; in->info->dim[4]=1; \
in->info->work[0] = OBIT_IO_AIPS; \
in->info->work[1]= size; \
ObitInfoListPut (in->info, "FileType", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[0], err);\
ObitInfoListPut (in->info, "IOBy", OBIT_int, in->info->dim, \
(gpointer)&in->info->work[1], err); \
in->info->dim[0] = IM_MAXDIM; \
ObitInfoListPut (in->info, "BLC", OBIT_int, in->info->dim, \
(gpointer)blc, err); \
ObitInfoListPut (in->info, "TRC", OBIT_int, in->info->dim, \
(gpointer)trc, err); \
in->info->dim[0] = 1; \
ObitInfoListPut (in->info, "Disk", OBIT_int, \
in->info->dim, (gpointer)&disk, err); \
ObitInfoListPut (in->info, "CNO", OBIT_int, \
in->info->dim, (gpointer)&cno, err); \
ObitInfoListPut (in->info, "User", OBIT_int, \
in->info->dim, (gpointer)&user, err); \
}G_STMT_END
Sets values on ObitInfoList on input object.
|
|
|
Value: G_STMT_START{ \
in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1; \
in->info->dim[3]=1; in->info->dim[4]=1; \
in->info->work[0] = OBIT_IO_FITS; \
in->info->work[1]= size; in->info->work[2]= disk; \
ObitInfoListPut (in->info, "FileType", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[0], err);\
ObitInfoListPut (in->info, "IOBy", OBIT_int, in->info->dim, \
(gpointer)&in->info->work[1], err); \
in->info->dim[0] = IM_MAXDIM; \
ObitInfoListPut (in->info, "BLC", OBIT_int, in->info->dim, \
(gpointer)blc, err); \
ObitInfoListPut (in->info, "TRC", OBIT_int, in->info->dim, \
(gpointer)trc, err); \
in->info->dim[0] = 1; \
ObitInfoListPut (in->info, "Disk", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[2], err); \
in->info->dim[0] = strlen(file); \
ObitInfoListPut (in->info, "FileName", OBIT_string, \
in->info->dim, (gpointer)file, err); \
}G_STMT_END
Sets values on ObitInfoList on input object.
|
|
|
Macro to unreference (and possibly destroy) an ObitImage returns a ObitImage*. in = object to unreference |
|
|
Typedef for definition of class pointer structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Public: Constructor. Initializes class if needed on first call.
|
|
||||||||||||
|
Public: Copy Constructor for scratch file. A scratch Image is more or less the same as a normal Image except that it is automatically deleted on the final unreference. The output will have the underlying files of the same type as in already allocated.
|
|
||||||||||||||||||||||||
|
Public: Return an associated Table. If such an object exists, a reference to it is returned, else a new object is created and entered in the ObitTableList.
|
|
|
Public: Class initializer.
|
|
||||||||||||||||
|
Public: Copy structure. Output version set to floating pixels
|
|
||||||||||||||||||||
|
Public: Copy structure of in1 on grid of in2. Only sets descriptor and data buffer members on out. Suitable for memory only image, out->mySel->FileType set to OBIT_IO_MEM. Returns without error if in1 cannot be projected onto in2. Routine translated from the AIPSish 4MASS/SUB/FLATEN.FOR/FLTMSC
|
|
||||||||||||||||
|
Public: Copy structure of in to memory resident Image out. out->mySel->FileType set to OBIT_IO_MEM.
|
|
||||||||||||
|
Public: Close file and become inactive.
|
|
||||||||||||||||
|
Public: Copy (deep) constructor. Copies are made of complex members including disk files; these will be copied applying whatever selection is associated with the input. Objects should be closed on input and will be closed on output. In order for the disk file structures to be copied, the output file must be sufficiently defined that it can be written. The copy will be attempted but no errors will be logged until both input and output have been successfully opened. ObitInfoList and ObitThread members are only copied if the output object didn't previously exist. Parent class members are included but any derived class info is ignored.
|
|
||||||||||||||||||||||||
|
Public: Copy associated Tables.
|
|
||||||||||||||||
|
Public: Fully instantiate. If object has previously been opened, as demonstrated by the existance of its myIO member, this operation is a no-op. Virtual - calls actual class member
|
|
|
Public: ClassInfo pointer.
|
|
||||||||||||||||||||
|
Public: Read specified image plane. If the object is open on call it is returned open, otherwise closed. The ObitImageDesc maintains the current location in the image. This is a NOP if in is a memory only image Note: the underlying routines need more work for > 3 dimensions, descriptor plane needs to be turned into an array.
|
|
||||||||||||||||
|
Public: Create ObitIO structures and open file. The image descriptor is read if OBIT_IO_ReadOnly or OBIT_IO_ReadWrite and written to disk if opened OBIT_IO_WriteOnly. Update for selection (blc,trc) is only done on OBIT_IO_ReadOnly . After the file has been opened, the member image is initialized for storing the image unless member extBuffer is TRUE. The file etc. info should have been stored in the ObitInfoList: "FileType" OBIT_int scalar = OBIT_IO_FITS or OBIT_IO_AIPS or OBIT_IO_MEM (no persistent form ) for file type.
|
|
||||||||||||||||||||
|
Public: Write specified image plane. If the object is open on call it is returned open, otherwise closed. The ObitImageDesc maintains the current location in the image. This is a NOP if in is a memory only image Note: the underlying routines need more work for > 3 dimensions, descriptor plane needs to be turned into an array.
|
|
||||||||||||||||
|
Public: Read specified data. Reads row in->myDesc->row + 1; plane in->myDesc->plane + 1 A series of calls will read sequential sections of the image, either a row at a time or a plane at a time as specified to ObitImageOpen. The ObitImageDesc maintains the current location in the image. This is a NOP if in is a memory only image
|
|
||||||||||||||||||||||||||||
|
Public: Read header keyword.
|
|
||||||||||||
|
Public: Rename underlying structures. For FITS files:
|
|
||||||||||||||||
|
Public: Do two Imagess have the same underlying structures?. This test is done using values entered into the ObitInfoList in case the object has not yet been opened.
|
|
||||||||||||
|
Public: Set name etc for a beam associated with an image.
|
|
||||||||||||
|
Public: Update disk resident tables information.
|
|
||||||||||||||||
|
Public: Write specified data. Writes row in->myDesc->row + 1; plane in->myDesc->plane + 1 A series of calls will write sequential sections of the image, either a row at a time or a plane at a time as specified to ObitImageOpen. The ObitImageDesc maintains the current location in the image. This is a NOP if in is a memory only image
|
|
||||||||||||||||||||||||||||
|
Public: Write header keyword.
|
|
||||||||||||
|
Public: Delete underlying structures.
|
|
||||||||||||||||||||
|
Public: Destroy an associated Table. The table is removed from the ObitTableList but the external form may not be updated.
|
1.3.9.1