57 static const char MODULE[] =
"ossimMonoGridRemapEngine::remapTile";
58 if (traceExec())
CLOG <<
"entering..." << endl;
85 for (
double line=origin.line; line<origin.line+height; line+=1.0)
87 for (
double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
97 pixel = tile_buf[offset] + (short) grid(samp,line);
102 if (pixel<0) tile_buf[offset] = 0;
103 else if (pixel>255) tile_buf[offset] = 255;
104 else tile_buf[offset] = pixel;
109 if (tile_buf[offset] == (
ossim_uint8) null) tile_buf[offset]++;
123 for (
double line=origin.line; line<origin.line+height; line+=1.0)
125 for (
double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
135 pixel = tile_buf[offset] + (int) grid(samp,line);
140 if (pixel<0) tile_buf[offset] = 0;
141 else if (pixel>2047) tile_buf[offset] = 2047;
142 else tile_buf[offset] = pixel;
147 if (tile_buf[offset] == (
ossim_uint16) null) tile_buf[offset]++;
161 for (
double line=origin.line; line<origin.line+height; line+=1.0)
163 for (
double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
173 pixel = tile_buf[offset] + (int) grid(samp,line);
178 if (pixel<0) tile_buf[offset] = 0;
179 else if (pixel>4095) tile_buf[offset] = 4095;
180 else tile_buf[offset] = pixel;
185 if (tile_buf[offset] == (
ossim_uint16) null) tile_buf[offset]++;
199 for (
double line=origin.line; line<origin.line+height; line+=1.0)
201 for (
double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
211 pixel = tile_buf[offset] + (int) grid(samp,line);
216 if (pixel<0) tile_buf[offset] = 0;
217 else if (pixel>8191) tile_buf[offset] = 8191;
218 else tile_buf[offset] = pixel;
223 if (tile_buf[offset] == (
ossim_uint16) null) tile_buf[offset]++;
237 for (
double line=origin.line; line<origin.line+height; line+=1.0)
239 for (
double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
249 pixel = tile_buf[offset] + (int) grid(samp,line);
254 if (pixel<0) tile_buf[offset] = 0;
255 else if (pixel>16383) tile_buf[offset] = 16383;
256 else tile_buf[offset] = pixel;
261 if (tile_buf[offset] == (
ossim_uint16) null) tile_buf[offset]++;
275 for (
double line=origin.line; line<origin.line+height; line+=1.0)
277 for (
double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
287 pixel = tile_buf[offset] + (int) grid(samp,line);
292 if (pixel<0) tile_buf[offset] = 0;
293 else if (pixel>32767) tile_buf[offset] = 32767;
294 else tile_buf[offset] = pixel;
299 if (tile_buf[offset] == (
ossim_uint16) null) tile_buf[offset]++;
313 for (
double line=origin.line; line<origin.line+height; line+=1.0)
315 for (
double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
325 pixel = tile_buf[offset] + (int) grid(samp,line);
330 if (pixel<0) tile_buf[offset] = 0;
331 else if (pixel>65535) tile_buf[offset] = 65535;
332 else tile_buf[offset] = pixel;
337 if (tile_buf[offset] == (
ossim_uint16) null) tile_buf[offset]++;
348 short* tile_buf = (
short*)tile->
getBuf(0);
351 for (
double line=origin.line; line<origin.line+height; line+=1.0)
353 for (
double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
358 if (tile_buf[offset] != (
short) null)
363 pixel = tile_buf[offset] + (short) grid(samp,line);
368 if (pixel<-32766) tile_buf[offset] = -32766;
369 else if (pixel> 32767) tile_buf[offset] = 32767;
370 else tile_buf[offset] = pixel;
375 if (tile_buf[offset] == (
short) null) tile_buf[offset]++;
391 if (traceExec())
CLOG <<
"returning..." << endl;
16 bit unsigned integer (15 bits used)
virtual ossim_uint32 getWidth() const
virtual ossim_uint32 getHeight() const
16 bit unsigned integer (14 bits used)
16 bit unsigned integer (13 bits used)
unsigned short ossim_uint16
virtual const ossim_float64 * getNullPix() const
ossimDblGrid * getGrid(unsigned int index)
virtual ossimScalarType getScalarType() const
16 bit unsigned integer (11 bits used)
virtual const void * getBuf() const
unsigned char ossim_uint8
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
16 bit unsigned integer (12 bits used)