IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 360


Ignore:
Timestamp:
Mar 31, 2004, 10:52:29 PM (22 years ago)
Author:
eugene
Message:

cleaned 'basic image' section

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r348 r360  
    1 %%% $Id: psLibSDRS.tex,v 1.21 2004-04-01 04:40:36 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.22 2004-04-01 08:52:29 eugene Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    17781778
    17791779\begin{verbatim}
    1780 /// basic image data structure.
    17811780typedef struct psImage {
    17821781    psType type;                        ///< image data type and dimension
     
    18121811array is given by the elements \code{(x0,y0)}.  The structure may
    18131812include references to subrasters (\code{children, Nchildren}) and/or
    1814 to a containing array (\code{parent}).
     1813to a containing array (\code{parent}).  Unless this is image is a
     1814child of another image (represents a subset of the pixels of another
     1815image), the image data is allocated in a contiguous block.
    18151816
    18161817We require a variety of functions to manipulate these image
    18171818structures, including creation, destruction, input, output, and
    18181819various manipulations of the pixels.  The required functions are
    1819 listed below.
     1820listed below, and fall into several categories.
     1821
     1822\subsubsection{Image Structure Manipulation}
    18201823
    18211824Create an image of a specified width, height, and data type.  This
     
    18231826to the valid FITS BITPIX types.
    18241827\begin{verbatim}
    1825 psImage *
    1826 psImageAlloc (int nx,                   ///< image width
    1827               int ny,                   ///< image height
    1828               psType type)              ///< image data type
    1829 \end{verbatim}
     1828psImage *psImageAlloc (int nx, int ny, psType type);
     1829\end{verbatim}
     1830where \code{nx} and \code{ny} specify the size of the image and
     1831\code{type} specifies the data type and the image dimensions (which
     1832must be 2).
    18301833
    18311834Define a subimage of the specified area of the given image.  This
     
    18331836outside of the parent image.
    18341837\begin{verbatim}
    1835 /// Create a subimage of the specified area.
    1836 psImage *
    1837 psImageSubset(psImage *out,             ///< Subimage to return, or NULL
    1838               const psImage *image,     ///< parent image
    1839               int nx,                   ///< subimage width (<= image.nx - x0) 
    1840               int ny,                   ///< subimage width (<= image.ny - y0) 
    1841               int x0,                   ///< subimage x-offset (0 <= x0 < nx)   
    1842               int y0                    ///< subimage y-offset (0 <= y0 < ny)   
    1843     );
    1844 \end{verbatim}
     1838psImage *psImageSubset(psImage *out, psImage *image, int nx, int ny, int x0, int y0);
     1839\end{verbatim}
     1840where \code{image} is the parent image, \code{nx,ny} specify the
     1841dimensions of the desired subraster, and \code{x0, y0} specify the
     1842starting pixel of the subraster.  The entire subraster must be
     1843contained within the raster of the parent image.  An image structure
     1844to populate may be specified by \code{out}, or if this is \code{NULL},
     1845a new structure is allocated. 
    18451846
    18461847Free the memory associated with a specific image, including the pixel
    18471848data. Free the children of the image if they exist.
    18481849\begin{verbatim}
    1849 void
    1850 psImageFree(psImage *restrict image     ///< free this image
    1851     );
    1852 \end{verbatim}
    1853 
    1854 Free only the pixels for a specified image.
    1855 \begin{verbatim}
    1856 psImage *
    1857 psImageFreePixels(psImage *restrict image ///< Image whose pixels are to be freed
    1858     );
    1859 \end{verbatim}
    1860 
    1861 Free the memory associated with the children of a specific image,
    1862 returning the number of children freed.
    1863 \begin{verbatim}
    1864 int
    1865 psImageFreeChildren(const psImage *image ///< free children of this image
    1866     );
     1850void psImageFree(psImage *image);
     1851\end{verbatim}
     1852
     1853Free only the pixels for a specified image:
     1854\begin{verbatim}
     1855psImage *psImageFreePixels(psImage *image);
     1856\end{verbatim}
     1857
     1858Free the image structure memory associated with the children of a
     1859specific image, returning the number of children freed.  Do not free
     1860the pixel data:
     1861\begin{verbatim}
     1862int psImageFreeChildren(psImage *image);
    18671863\end{verbatim}
    18681864
    18691865Create a copy of the specified image.  If the output target pointer is
    1870 not NULL, place the result in the specified structure.
    1871 \begin{verbatim}
    1872 psImage *
    1873 psImageCopy(psImage *output,            ///< target structure for output image data
    1874             const psImage *input        ///< copy this image
    1875     );
    1876 \end{verbatim}
     1866not NULL, place the result in the specified structure.  The output
     1867image data must be allocated as a single, contiguous block of memory.
     1868\begin{verbatim}
     1869psImage *psImageCopy(psImage *output, psImage *input);
     1870\end{verbatim}
     1871
     1872\subsubsection{Image Pixel Extractions}
    18771873
    18781874Extract pixels from rectlinear region to a vector (array of floats).
     
    18831879is derived from the statistics of the pixels at that direction
    18841880coordinate.  The statistic used to derive the output vector value is
    1885 specified by \code{psStats stats}.
    1886 \begin{verbatim}
    1887 psFloatArray *
    1888 psImageSlice(psFloatArray *out,         ///< Vector to output, or NULL
    1889              const psImage *input,      ///< extract slice from this image
    1890              int x,                     ///< starting x coord of region to slice
    1891              int y,                     ///< starting y coord of region to slice
    1892              int nx,                    ///< width of region in x
    1893              int ny,                    ///< width of region in y
    1894              int direction,             ///< direction of vector along slice
    1895              const psStats *stats       ///< defines statistics used to find output values
    1896     );
     1881specified by \code{psStats *stats}.
     1882\begin{verbatim}
     1883psFloatArray *psImageSlice(psFloatArray *out, psImage *input, int x, int y, int nx, int ny, int direction, const psStats *stats);
    18971884\end{verbatim}
    18981885
     
    19071894specified by \code{psStats stats}.
    19081895\begin{verbatim}
    1909 psFloatArray *
    1910 psImageCut(psFloatArray *out,           ///< Vector to output, or NULL
    1911            const psImage *input,        ///< extract cut from this image
    1912            float xs,                    ///< starting x coord of cut
    1913            float ys,                    ///< starting y coord of cut
    1914            float xe,                    ///< ending x coord of cut
    1915            float ye,                    ///< ending y coord of cut
    1916            float dw,                    ///< width of cut
    1917            const psStats *stats         ///< defines statistics used to find output values
    1918     );
    1919  \end{verbatim}
    1920 
     1896psFloatArray *psImageCut(psFloatArray *out, psImage *input, float xs, float ys, float xe, float ye, float dw, const psStats *stats);
     1897\end{verbatim}
    19211898
    19221899Extract radial annuli data to a vector.  A vector is constructed
     
    19281905stats}
    19291906\begin{verbatim}
    1930 psFloatArray *
    1931 psImageRadialCut(psFloatArray *out,     ///< Vector to output, or NULL
    1932                  const psImage *input,  ///< extract profile from this image
    1933                  float x,               ///< center x coord of annulii
    1934                  float y,               ///< center y coord of annulii
    1935                  float radius,          ///< outer radius of annulii
    1936                  float dr,              ///< radial step size of annulii
    1937                  const psStats *stats   ///< defines statistics used to find output values
    1938     );
    1939 \end{verbatim}
     1907psFloatArray *psImageRadialCut(psFloatArray *out, psImage *input, float x, float y, float radius, float dr, psStats *stats);
     1908\end{verbatim}
     1909
     1910\subsubsection{Image Geometry Manipulation}
    19401911
    19411912Rebin image to new scale.  A new image is constructed in which the
     
    19971968\end{verbatim}
    19981969
     1970\subsubsection{Image Statistical Functions}
     1971
    19991972Determine statistics for image (or subimage).  The statistics to be
    20001973determined are specified by \code{psStats stats}.
     
    20352008    );
    20362009\end{verbatim}
     2010
     2011\subsubsection{Image I/O Functions}
    20372012
    20382013Read an image or subimage from a named file.  This function is a
     
    21382113    );
    21392114\end{verbatim}
     2115
     2116\subsubsection{Image Pixel Manipulations}
    21402117
    21412118Perform a 2-D FFT on the specified image.  The returned image is of
Note: See TracChangeset for help on using the changeset viewer.