53 template <
typename PixelT>
67 assert(x.
img == NULL);
79 throw LSST_EXCEPT(pexExcept::MemoryError,
"GpuBuffer2D:Init - not enough memory");
83 for (
int i = 0; i <
height; ++i) {
88 ++inPtr, ++imageDataPtr) {
89 *imageDataPtr = *inPtr;
101 throw LSST_EXCEPT(pexExcept::MemoryError,
"GpuBuffer2D:Init - not enough memory");
125 assert(y >= 0 && y <
height);
130 assert(y >= 0 && y <
height);
135 assert(x >= 0 && x <
width);
136 assert(y >= 0 && y <
height);
141 assert(x >= 0 && x <
width);
142 assert(y >= 0 && y <
height);
149 for (
int i = 0; i <
height; ++i) {
152 for (
int j = 0; j <
width; j++) {
163 for (
int i = 0; i <
height; ++i) {
167 cnvEnd = cnvPtr +
width; cnvPtr != cnvEnd; ++cnvPtr ) {
168 *cnvPtr = *outPtrImg;
void CopyToImage(ImageT outImage, int startX, int startY)
Class for representing an image or 2D array in general)
lsst::afw::image::Image< PixelT > ImageT
GpuBuffer2D(int width, int height)
PixelT * GetImgLinePtr(int y)
table::Key< table::Array< Kernel::Pixel > > image
const PixelT * GetImgLinePtr(int y) const
int getWidth() const
Return the number of columns in the image.
x_iterator x_at(int x, int y) const
Return an x_iterator to the point (x, y) in the image.
void Init(int width, int height)
GpuBuffer2D(const ImageT &image)
#define LSST_EXCEPT(type,...)
const PixelT & Pixel(int x, int y) const
void CopyFromBuffer(const GpuBuffer2D< PixelT > &buffer, int startX, int startY)
GpuBuffer2D(const GpuBuffer2D &x)
_view_t::x_iterator x_iterator
An iterator for traversing the pixels in a row.
void Init(const ImageT &image)
int getHeight() const
Return the number of rows in the image.
PixelT & Pixel(int x, int y)