Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/people/mcalabre/WCS/wcslib/structlinprm.html
Дата изменения: Unknown Дата индексирования: Sun Apr 10 23:50:46 2016 Кодировка: Поисковые слова: saturn's moon |
WCSLIB
5.15
|
Linear transformation parameters. More...
#include <lin.h>
Data Fields | |
int | flag |
int | naxis |
double * | crpix |
double * | pc |
double * | cdelt |
struct disprm * | dispre |
struct disprm * | disseq |
double * | piximg |
double * | imgpix |
int | i_naxis |
int | unity |
int | affine |
int | simple |
struct wcserr * | err |
double * | tmpcrd |
int | m_flag |
int | m_naxis |
double * | m_crpix |
double * | m_pc |
double * | m_cdelt |
struct disprm * | m_dispre |
struct disprm * | m_disseq |
The linprm struct contains all of the information required to perform a linear transformation. It consists of certain members that must be set by the user (given) and others that are set by the WCSLIB routines (returned).
int linprm::flag |
(Given and returned) This flag must be set to zero whenever any of the following members of the linprm struct are set or modified:
This signals the initialization routine, linset(), to recompute the returned members of the linprm struct. linset() will reset flag to indicate that this has been done.
PLEASE NOTE: flag should be set to -1 when linini() is called for the first time for a particular linprm struct in order to initialize memory management. It must ONLY be used on the first initialization otherwise memory leaks may result.
int linprm::naxis |
(Given or returned) Number of pixel and world coordinate elements.
If linini() is used to initialize the linprm struct (as would normally be the case) then it will set naxis from the value passed to it as a function argument. The user should not subsequently modify it.
double * linprm::crpix |
(Given) Pointer to the first element of an array of double containing the coordinate reference pixel, CRPIXja
.
It is not necessary to reset the linprm struct (via linset()) when linprm::crpix is changed.
double * linprm::pc |
(Given) Pointer to the first element of the PCi_ja
(pixel coordinate) transformation matrix. The expected order is
This may be constructed conveniently from a 2-D array via
which is equivalent to
The storage order for this 2-D array is the same as for the 1-D array, whence
would be legitimate.
double * linprm::cdelt |
(Given) Pointer to the first element of an array of double containing the coordinate increments, CDELTia
.
struct disprm * linprm::dispre |
(Given) Pointer to a disprm struct holding parameters for prior distortion functions, or a null (0x0) pointer if there are none.
Function lindis() may be used to assign a disprm pointer to a linprm struct, allowing it to take control of any memory allocated for it, as in the following example:
Here, after the distortion function parameters etc. are copied into dispre, dispre is assigned using lindis() which takes control of the allocated memory. It will be free'd later when linfree() is invoked on the linprm struct.
Consider also the following erroneous code:
Here, dispre is declared as a struct, rather than a pointer. When the function returns, dispre will go out of scope and its memory will most likely be reused, thereby trashing its contents. Later, a segfault will occur when linfree() tries to free dispre's stale address.
struct disprm * linprm::disseq |
(Given) Pointer to a disprm struct holding parameters for sequent distortion functions, or a null (0x0) pointer if there are none.
Refer to the comments and examples given for disprm::dispre.
double * linprm::piximg |
(Returned) Pointer to the first element of the matrix containing the product of the CDELTia
diagonal matrix and the PCi_ja
matrix.
double * linprm::imgpix |
(Returned) Pointer to the first element of the inverse of the linprm::piximg matrix.
int linprm::i_naxis |
(Returned) The dimension of linprm::piximg and linprm::imgpix (normally equal to naxis).
int linprm::unity |
(Returned) True if the linear transformation matrix is unity.
int linprm::affine |
(Returned) True if there are no distortions.
int linprm::simple |
(Returned) True if unity and no distortions.
struct wcserr * linprm::err |
(Returned) If enabled, when an error status is returned, this struct contains detailed information about the error, see wcserr_enable().
double * linprm::tmpcrd |
(For internal use only.)
int linprm::m_flag |
(For internal use only.)
int linprm::m_naxis |
(For internal use only.)
double * linprm::m_crpix |
(For internal use only.)
double * linprm::m_pc |
(For internal use only.)
double * linprm::m_cdelt |
(For internal use only.)
struct disprm * linprm::m_dispre |
(For internal use only.)
struct disprm * linprm::m_disseq |
(For internal use only.)