104 std::vector<ossimPolygon>& regionList,
109 for(i = 0; i < (int)regionList.size();++i)
119 std::vector<ossimPolygon>& regionList,
124 for(i = 0; i < (int)regionList.size();++i)
136 double colorArray[3];
138 colorArray[0] = color.
getR();
139 colorArray[1] = color.
getG();
140 colorArray[2] = color.
getB();
147 fill(static_cast<ossim_uint8>(0),
148 (
const double*)colorArray,
178 double colorArray[3];
180 colorArray[0] = color.
getR();
181 colorArray[1] = color.
getG();
182 colorArray[2] = color.
getB();
190 fill(static_cast<ossim_uint8>(0),
226 fill(static_cast<ossim_uint8>(0),
239 fill(static_cast<ossim_uint16>(0),
247 fill(static_cast<ossim_sint16>(0),
256 fill(static_cast<float>(0),
265 fill(static_cast<double>(0),
287 fill(static_cast<ossim_uint8>(0),
300 fill(static_cast<ossim_uint16>(0),
308 fill(static_cast<ossim_sint16>(0),
317 fill(static_cast<float>(0),
326 fill(static_cast<double>(0),
352 vector<ossimPolygon> clipList;
379 vector<int> polyInts;
389 for (
y = miny; (
y <= maxy);
y++)
393 for (i = 0; (i <
n); i++)
405 y1 = ossim::round<int>(region[ind1].y);
406 y2 = ossim::round<int>(region[ind2].y);
409 x1 = ossim::round<int>(region[ind1].x);
410 x2 = ossim::round<int>(region[ind2].x);
414 y2 = ossim::round<int>(region[ind1].y);
415 y1 = ossim::round<int>(region[ind2].y);
416 x2 = ossim::round<int>(region[ind1].x);
417 x1 = ossim::round<int>(region[ind2].x);
423 if ((
y >= y1) && (
y < y2))
425 polyInts.push_back((
y - y1) * (x2 - x1) / (y2 - y1) + x1);
427 else if ((
y == maxy) && (
y > y1) && (
y <= y2))
429 polyInts.push_back((
y - y1) * (x2 - x1) / (y2 - y1) + x1);
432 std::sort(polyInts.begin(), polyInts.end());
434 for (i = 0; (i < (int)polyInts.size()); i += 2)
438 while(startX <= endX)
444 buf[rowOffset+bandOffset+startX] = (inputBuf[rowOffset+bandOffset+startX]);
445 bandOffset += blockLength;
456 const double* values,
465 vector<ossimPolygon> clipList;
471 fill( dummyVariable, values, clipList[i] );
476 fill( dummyVariable, values, region );
482 const double* values,
502 const double* values,
513 vector<int> polyInts;
523 for (
y = miny; (
y <= maxy);
y++)
527 for (i = 0; (i <
n); i++)
539 y1 = ossim::round<int>(region[ind1].y);
540 y2 = ossim::round<int>(region[ind2].y);
543 x1 = ossim::round<int>(region[ind1].x);
544 x2 = ossim::round<int>(region[ind2].x);
548 y2 = ossim::round<int>(region[ind1].y);
549 y1 = ossim::round<int>(region[ind2].y);
550 x2 = ossim::round<int>(region[ind1].x);
551 x1 = ossim::round<int>(region[ind2].x);
557 if ((
y >= y1) && (
y < y2))
559 polyInts.push_back((
y - y1) * (x2 - x1) / (y2 - y1) + x1);
561 else if ((
y == maxy) && (
y > y1) && (
y <= y2))
563 polyInts.push_back((
y - y1) * (x2 - x1) / (y2 - y1) + x1);
566 std::sort(polyInts.begin(), polyInts.end());
568 for (i = 0; (i < (int)polyInts.size()); i += 2)
572 while(startX <= endX)
578 buf[rowOffset+bandOffset+startX] = (T)(values[band]);
579 bandOffset += blockLength;
590 const double* values,
610 for (
y = miny; (
y <= maxy); ++
y)
613 while(startX <= endX)
617 for(band = 0; band < bands;++band)
619 buf[rowOffset+bandOffset+startX] = (T)(values[band]);
620 bandOffset += blockLength;
16 bit unsigned integer (15 bits used)
virtual ossim_uint32 getWidth() const
void setImageData(ossimImageData *imageData)
virtual ossim_uint32 getNumberOfBands() const
unsigned char getR() const
ossimPolyArea2d thePolyImageRectangle
ossimImageDataHelper(ossimImageData *imageData=0)
const ossimIpt & ul() const
virtual ossim_uint32 getHeight() const
16 bit unsigned integer (14 bits used)
16 bit unsigned integer (13 bits used)
ossimImageData * theImageData
void copyInputToThis(const void *input, const ossimPolygon ®ion, bool clipPoly=true)
void getIntegerBounds(ossim_int32 &minX, ossim_int32 &minY, ossim_int32 &maxX, ossim_int32 &maxY) const
ossim_uint32 getVertexCount() const
os2<< "> n<< " > nendobj n
void fill(const double *values, const ossimIrect &rect, bool clipPoly=true)
unsigned int ossim_uint32
32 bit normalized floating point
virtual ossimIrect getImageRectangle() const
unsigned char getB() const
const ossimIpt & lr() const
ossimIrect clipToRect(const ossimIrect &rect) const
unsigned char getG() const
virtual ossimScalarType getScalarType() const
64 bit normalized floating point
16 bit unsigned integer (11 bits used)
ossimIrect theImageRectangle
virtual const void * getBuf() const
bool getVisiblePolygons(vector< ossimPolygon > &polyList) const
16 bit unsigned integer (12 bits used)