Changeset 21323 for trunk/pswarp/src/pswarpTransformTile.c
- Timestamp:
- Feb 5, 2009, 10:44:04 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpTransformTile.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpTransformTile.c
r21183 r21323 1 /** @file pswarpTransformTile.c 2 * 3 * @brief 4 * 5 * @ingroup pswarp 6 * 7 * @author IfA 8 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-05 20:44:04 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #include "pswarp.h" 2 14 … … 36 48 bool pswarpTransformTile(pswarpTransformTileArgs *args) 37 49 { 38 psImage *inImage = args->input->image; // Input image39 psImage *outImage = args->output->image; // Output image50 psImage *inImage = args->input->image; ///< Input image 51 psImage *outImage = args->output->image; ///< Output image 40 52 41 int inNumCols = inImage->numCols, inNumRows = inImage->numRows; // Size of input image42 int outNumCols = outImage->numCols, outNumRows = outImage->numRows; // Size of output image43 int outCol0 = outImage->col0, outRow0 = outImage->row0; // Offset of output image53 int inNumCols = inImage->numCols, inNumRows = inImage->numRows; ///< Size of input image 54 int outNumCols = outImage->numCols, outNumRows = outImage->numRows; ///< Size of output image 55 int outCol0 = outImage->col0, outRow0 = outImage->row0; ///< Offset of output image 44 56 45 psPlane minPt, maxPt; // Minimum and maximum points for this tile57 psPlane minPt, maxPt; ///< Minimum and maximum points for this tile 46 58 pswarpMapGridCoordRange(args->grid, args->gridX, args->gridY, &minPt, &maxPt); 47 59 … … 52 64 psImageMaskType **inMaskData = (args->input->mask) ? args->input->mask->data.PS_TYPE_IMAGE_MASK_DATA : NULL; 53 65 54 pswarpMap *map = args->grid->maps[args->gridX][args->gridY]; // Map for this tile55 psImage *region = args->region; // Region to transform66 pswarpMap *map = args->grid->maps[args->gridX][args->gridY]; ///< Map for this tile 67 psImage *region = args->region; ///< Region to transform 56 68 57 / / Bounds for iteration69 /** Bounds for iteration */ 58 70 int xMin = PS_MAX(minPt.x, 0); 59 71 int xMax = PS_MIN(maxPt.x, outNumCols); … … 62 74 63 75 // Iterate over the output image pixels (parent frame) 64 long goodPixels = 0; // Number of input pixels landing on the output image76 long goodPixels = 0; ///< Number of input pixels landing on the output image 65 77 for (int y = yMin; y < yMax; y++) { 66 78 for (int x = xMin; x < xMax; x++) { … … 80 92 } 81 93 94 double imageValue, varValue; // Value of image and variance map 95 82 96 // psImagePixelInterpolate determines the value at pixel coordinate (x,y) in child coordinates 83 double imageValue, varValue; // Value of image and variance map84 97 psImageMaskType maskValue = inMaskData ? inMaskData[(int)yIn][(int)xIn] : 0; // Value of mask 98 85 99 if (!psImageInterpolate(&imageValue, &varValue, &maskValue, xIn, yIn, args->interp)) { 86 100 psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image."); … … 88 102 } 89 103 90 int xOut = x - outCol0, yOut = y - outRow0; // Position on output image104 int xOut = x - outCol0, yOut = y - outRow0; ///< Position on output image 91 105 92 106 if (outImageData) {
Note:
See TracChangeset
for help on using the changeset viewer.
