Changeset 1663
- Timestamp:
- Aug 30, 2004, 3:32:34 PM (22 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 2 edited
-
ChangeLogSDRS.tex (modified) (1 diff)
-
psLibSDRS.tex (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogSDRS.tex
r1646 r1663 263 263 \item Changed the order of some \code{psList} function arguments to 264 264 match that of \code{psMetadata}. 265 265 \item \code{psLogSetDestination} return type changed to \code{bool}. 266 \item \code{psImage.nChildren} and \code{.children} changed to 267 \code{psArray *children}. 268 \item Added extra input parameters to \code{psKernelGenerate}: 269 \code{psVector *tShifts} and \code{bool relative}. 270 \item Synched \code{psImageSubset}, \code{psImageTrim}, 271 \code{psImageReadSection} and \code{psImageSlice} to use a 272 consistent region specification: \code{x0,y0,x1,y1}, where \code{x1} 273 and \code{y1} are exclusive, and may be negative. 266 274 \end{itemize} -
trunk/doc/pslib/psLibSDRS.tex
r1662 r1663 1 %%% $Id: psLibSDRS.tex,v 1.9 5 2004-08-30 21:48:03price Exp $1 %%% $Id: psLibSDRS.tex,v 1.96 2004-08-31 01:32:34 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 2300 2300 2301 2301 \begin{verbatim} 2302 psImage *psImageSubset(const psImage *image, int nx, int ny, int x0, int y0);2302 psImage *psImageSubset(const psImage *image, int x0, int y0, int x1, int y1); 2303 2303 \end{verbatim} 2304 2304 Define a subimage of the specified area of the given image. This 2305 2305 function must raise an error if the requested subset area lies outside 2306 2306 of the parent image and return \code{NULL}. The argument \code{image} 2307 is the parent image, \code{nx,ny} specify the dimensions of the 2308 desired subraster, and \code{x0, y0} specify the starting pixel of the 2309 subraster. The entire subraster must be contained within the raster 2310 of the parent image. Note that the \code{refCounter} for the parent 2311 should be incremented. This function must be defined for the 2312 following types: \code{psU8}, \code{psU16}, \code{psS8}, \code{psS16}, 2313 \code{psF32}, \code{psF64}, \code{psC32}, \code{psC64}. 2307 is the parent image, \code{x0, y0} specify the starting pixel of the 2308 subraster, and \code{x1,y1} specify the extent of the desired 2309 subraster. Note that the row and column of this ``upper right-hand 2310 corner'' are \textit{NOT} included in the region. In the event that 2311 \code{x1} or \code{y1} are negative, they shall be interpreted as 2312 being relative to the size of the parent image in that dimension. The 2313 entire subraster must be contained within the raster of the parent 2314 image. Note that the \code{refCounter} for the parent should be 2315 incremented. This function must be defined for the following types: 2316 \code{psU8}, \code{psU16}, \code{psS8}, \code{psS16}, \code{psF32}, 2317 \code{psF64}, \code{psC32}, \code{psC64}. 2314 2318 2315 2319 \begin{verbatim} … … 2340 2344 \end{verbatim} 2341 2345 Trim the specified \code{image} in-place, which involves shuffling the 2342 pixels around in memory. The pixels in the region 2343 \code{[x0:x1,y0:y1]} (inclusive) shall consist the output image. 2346 pixels around in memory. The region to be kept is defined by the 2347 lower-left corner, \code{x0,y0}, and the upper-right corner, 2348 \code{x1,y1}. Note that the row and column of the ``upper right-hand 2349 corner'' are \textit{NOT} included in the region. In the event that 2350 \code{x1} or \code{y1} are negative, they shall be interpreted as 2351 being relative to the size of the parent image in that dimension. 2344 2352 2345 2353 The function shall generate an error if the specified region is … … 2356 2364 } psImageCutDirection; 2357 2365 2358 psVector *psImageSlice(psVector *out, 2359 psVector *coords, 2360 const psImage *input, 2361 const psImage *mask, 2362 unsigned int maskVal, 2363 unsigned int x, 2364 unsigned int y, 2365 unsigned int nx, 2366 unsigned int ny, 2367 psImageCutDirection direction, 2368 const psStats *stats); 2366 psVector *psImageSlice(psVector *out, psVector *coords, const psImage *input, 2367 const psImage *mask, unsigned int maskVal, int x0, int y0, 2368 int x1, int y1, psImageCutDirection direction, const psStats *stats); 2369 2369 \end{verbatim} 2370 2370 Extract pixels from rectlinear region to a vector (array of floats). 2371 The output vector contains either \code{nx} or \code{ny} elements, 2372 based on the value of the direction: e.g., if \code{direction} is 2373 \code{PS_CUT_X_POS}, there are \code{nx} elements. The input region 2374 is collapsed in the perpendicular direction, and each element of the 2375 output vectors is derived from the statistics of the pixels at that 2376 direction coordinate. The statistic used to derive the output vector 2377 value is specified by \code{stats}. If \code{coords} is not 2378 \code{NULL}, the calculated coordinates along the slice are returned 2379 in this vector. Only one of the statistics choices may be specified, 2380 otherwise the function must return an error. This function must be 2381 defined for the following types: \code{psS8}, \code{psU16}, 2382 \code{psF32}, \code{psF64}. 2371 The output vector contains either \code{x1-x0} or \code{y1-y0} 2372 elements, based on the value of the direction: e.g., if 2373 \code{direction} is \code{PS_CUT_X_POS}, there are \code{x1-x0} 2374 elements. The region to be ``sliced'' is defined by the lower-left 2375 corner, \code{x0,y0}, and the upper-right corner, \code{x1,y1}. Note 2376 that the row and column of the ``upper right-hand corner'' are 2377 \textit{NOT} included in the region. In the event that \code{x1} or 2378 \code{y1} are negative, they shall be interpreted as being relative to 2379 the size of the parent image in that dimension. 2380 2381 The input region is collapsed in the direction perpendicular to that 2382 specified by \code{direction}, and each element of the output vectors 2383 is derived from the statistics of the pixels at that direction 2384 coordinate. The statistic used to derive the output vector value is 2385 specified by \code{stats}. If \code{coords} is not \code{NULL}, the 2386 calculated coordinates along the slice are returned in this vector. 2387 Only one of the statistics choices may be specified, otherwise the 2388 function must return an error. This function must be defined for the 2389 following types: \code{psS8}, \code{psU16}, \code{psF32}, 2390 \code{psF64}. 2383 2391 2384 2392 \begin{verbatim} … … 2569 2577 2570 2578 \begin{verbatim} 2571 psImage *psImageReadSection(psImage *output, int x0, int y0, int nx, int ny, int z,2579 psImage *psImageReadSection(psImage *output, int x0, int y0, int x1, int y1, int z, 2572 2580 const char *extname, int extnum, const char *filename); 2573 2581 \end{verbatim} … … 2575 2583 wrapper to the FITS library function. The input parameters allow a 2576 2584 full image or a subimage to be read. The starting pixel of the region 2577 is specified by \code{x,y}, while the dimensions of the requested 2578 region are specified by \code{nx,ny}. A negative value for either of 2579 \code{nx} or \code{ny} specifies the size of the region to be read 2580 counting down from the end of the array. In other words, the implied 2581 value of \code{nx} is: 2582 \begin{verbatim} 2583 nx = (nx > 0) ? nx : image.ncols - x + nx; 2584 \end{verbatim} 2585 is specified by \code{x0,y0}, while the upper right-hand corner of the 2586 requested region is specified by \code{x1,y1}. A negative value for 2587 either of \code{x1} or \code{y2} specifies the size of the region to 2588 be read counting down from the end of the array. 2589 2585 2590 If the native image is a cube, the value of z specifies the requested 2586 2591 slice of the image. The data is read from the extension specified by … … 2971 2976 The API shall be the following: 2972 2977 \begin{verbatim} 2973 psKernel *psKernelGenerate(const psVector *xShifts, const psVector *yShifts); 2978 psKernel *psKernelGenerate(const psVector *tShifts, const psVector *xShifts, 2979 const psVector *yShifts, bool relative); 2974 2980 \end{verbatim} 2975 2981 2976 2982 The vectors \code{xShifts} and \code{yShifts}, which are a list of 2977 shifts relative to some starting point, will be supplied by the user. 2978 The elements of the vectors should be of an integer type; otherwise 2979 the values shall be truncated to integers. The output kernel shall be 2980 normalized such that the sum over the kernel is unity. 2981 2982 If the vectors are not of the same number of elements, then the 2983 shifts made at the times \code{tShifts}, are used to construct the 2984 appropriate kernel. If \code{relative} is \code{true}, then each 2985 shift is to be interpreted relative the shift made before; if 2986 \code{relative} is \code{false}, then the shifts are to be interpreted 2987 relative to some starting point. The elements of the vectors should 2988 be of an integer type; otherwise the values shall be truncated to 2989 integers. The output kernel shall be normalized such that the sum 2990 over the kernel is unity. 2991 2992 If the vectors are not all of the same number of elements, then the 2983 2993 function shall generate a warning shall be generated, following which, 2984 2994 the longer vector trimmed to the length of the shorter, and the
Note:
See TracChangeset
for help on using the changeset viewer.
