Changeset 360
- Timestamp:
- Mar 31, 2004, 10:52:29 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r348 r360 1 %%% $Id: psLibSDRS.tex,v 1.2 1 2004-04-01 04:40:36 price Exp $1 %%% $Id: psLibSDRS.tex,v 1.22 2004-04-01 08:52:29 eugene Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 1778 1778 1779 1779 \begin{verbatim} 1780 /// basic image data structure.1781 1780 typedef struct psImage { 1782 1781 psType type; ///< image data type and dimension … … 1812 1811 array is given by the elements \code{(x0,y0)}. The structure may 1813 1812 include references to subrasters (\code{children, Nchildren}) and/or 1814 to a containing array (\code{parent}). 1813 to a containing array (\code{parent}). Unless this is image is a 1814 child of another image (represents a subset of the pixels of another 1815 image), the image data is allocated in a contiguous block. 1815 1816 1816 1817 We require a variety of functions to manipulate these image 1817 1818 structures, including creation, destruction, input, output, and 1818 1819 various manipulations of the pixels. The required functions are 1819 listed below. 1820 listed below, and fall into several categories. 1821 1822 \subsubsection{Image Structure Manipulation} 1820 1823 1821 1824 Create an image of a specified width, height, and data type. This … … 1823 1826 to the valid FITS BITPIX types. 1824 1827 \begin{verbatim} 1825 psImage * 1826 psImageAlloc (int nx, ///< image width 1827 int ny, ///< image height 1828 psType type) ///< image data type 1829 \end{verbatim} 1828 psImage *psImageAlloc (int nx, int ny, psType type); 1829 \end{verbatim} 1830 where \code{nx} and \code{ny} specify the size of the image and 1831 \code{type} specifies the data type and the image dimensions (which 1832 must be 2). 1830 1833 1831 1834 Define a subimage of the specified area of the given image. This … … 1833 1836 outside of the parent image. 1834 1837 \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} 1838 psImage *psImageSubset(psImage *out, psImage *image, int nx, int ny, int x0, int y0); 1839 \end{verbatim} 1840 where \code{image} is the parent image, \code{nx,ny} specify the 1841 dimensions of the desired subraster, and \code{x0, y0} specify the 1842 starting pixel of the subraster. The entire subraster must be 1843 contained within the raster of the parent image. An image structure 1844 to populate may be specified by \code{out}, or if this is \code{NULL}, 1845 a new structure is allocated. 1845 1846 1846 1847 Free the memory associated with a specific image, including the pixel 1847 1848 data. Free the children of the image if they exist. 1848 1849 \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 ); 1850 void psImageFree(psImage *image); 1851 \end{verbatim} 1852 1853 Free only the pixels for a specified image: 1854 \begin{verbatim} 1855 psImage *psImageFreePixels(psImage *image); 1856 \end{verbatim} 1857 1858 Free the image structure memory associated with the children of a 1859 specific image, returning the number of children freed. Do not free 1860 the pixel data: 1861 \begin{verbatim} 1862 int psImageFreeChildren(psImage *image); 1867 1863 \end{verbatim} 1868 1864 1869 1865 Create 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 psImage Copy(psImage *output, ///< target structure for output image data1874 const psImage *input ///< copy this image 1875 ); 1876 \ end{verbatim}1866 not NULL, place the result in the specified structure. The output 1867 image data must be allocated as a single, contiguous block of memory. 1868 \begin{verbatim} 1869 psImage *psImageCopy(psImage *output, psImage *input); 1870 \end{verbatim} 1871 1872 \subsubsection{Image Pixel Extractions} 1877 1873 1878 1874 Extract pixels from rectlinear region to a vector (array of floats). … … 1883 1879 is derived from the statistics of the pixels at that direction 1884 1880 coordinate. 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 ); 1881 specified by \code{psStats *stats}. 1882 \begin{verbatim} 1883 psFloatArray *psImageSlice(psFloatArray *out, psImage *input, int x, int y, int nx, int ny, int direction, const psStats *stats); 1897 1884 \end{verbatim} 1898 1885 … … 1907 1894 specified by \code{psStats stats}. 1908 1895 \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 1896 psFloatArray *psImageCut(psFloatArray *out, psImage *input, float xs, float ys, float xe, float ye, float dw, const psStats *stats); 1897 \end{verbatim} 1921 1898 1922 1899 Extract radial annuli data to a vector. A vector is constructed … … 1928 1905 stats} 1929 1906 \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} 1907 psFloatArray *psImageRadialCut(psFloatArray *out, psImage *input, float x, float y, float radius, float dr, psStats *stats); 1908 \end{verbatim} 1909 1910 \subsubsection{Image Geometry Manipulation} 1940 1911 1941 1912 Rebin image to new scale. A new image is constructed in which the … … 1997 1968 \end{verbatim} 1998 1969 1970 \subsubsection{Image Statistical Functions} 1971 1999 1972 Determine statistics for image (or subimage). The statistics to be 2000 1973 determined are specified by \code{psStats stats}. … … 2035 2008 ); 2036 2009 \end{verbatim} 2010 2011 \subsubsection{Image I/O Functions} 2037 2012 2038 2013 Read an image or subimage from a named file. This function is a … … 2138 2113 ); 2139 2114 \end{verbatim} 2115 2116 \subsubsection{Image Pixel Manipulations} 2140 2117 2141 2118 Perform a 2-D FFT on the specified image. The returned image is of
Note:
See TracChangeset
for help on using the changeset viewer.
