#include <ossimHsvGridRemapEngine.h>
◆ ossimHsvGridRemapEngine()
ossimHsvGridRemapEngine::ossimHsvGridRemapEngine |
( |
| ) |
|
|
inline |
◆ assignRemapValues()
void ossimHsvGridRemapEngine::assignRemapValues |
( |
std::vector< ossimAtbPointSource *> & |
sources | ) |
|
|
virtual |
Implements ossimGridRemapEngine.
Definition at line 157 of file ossimHsvGridRemapEngine.cpp.
160 static const char MODULE[] =
"ossimHsvGridRemapEngine::assignRemapValues";
161 if (traceExec())
CLOG <<
"entering..." << endl;
169 int num_contributors = (int)sources_list.size();
170 double** contributor_pixel =
new double* [num_contributors];
171 for (i=0; i<num_contributors; i++)
172 contributor_pixel[i] =
new double[3];
173 double target_pixel[3] = {0.0, 0.0, 0.0};
178 vector<ossimAtbPointSource*>::iterator source;
180 for(source = sources_list.begin();
181 source != sources_list.end();
184 (*source)->getSourceValue(contributor_pixel[i]);
186 target_pixel[0] += contributor_pixel[i][0]/(double)num_contributors;
187 target_pixel[1] += contributor_pixel[i][1]/(double)num_contributors;
188 target_pixel[2] += contributor_pixel[i][2]/(double)num_contributors;
198 for(source = sources_list.begin();
199 source != sources_list.end();
209 for (i=0; i<num_contributors; i++)
210 delete [] contributor_pixel[i];
211 delete [] contributor_pixel;
213 if (traceExec())
CLOG <<
"returning..." << endl;
virtual void computeRemapNode(ossimAtbPointSource *point_source, void *source_value, void *target_value)
◆ computeRemapNode()
void ossimHsvGridRemapEngine::computeRemapNode |
( |
ossimAtbPointSource * |
point_source, |
|
|
void * |
source_value, |
|
|
void * |
target_value |
|
) |
| |
|
protectedvirtual |
Implements ossimGridRemapEngine.
Definition at line 255 of file ossimHsvGridRemapEngine.cpp.
259 static const char MODULE[] =
"ossimHsvGridRemapEngine::computeRemapNode";
260 if (traceExec())
CLOG <<
"entering..." << endl;
266 node[0] = ((
double*)target_value)[0] - ((
double*)source_value)[0];
267 node[1] = ((
double*)target_value)[1] - ((
double*)source_value)[1];
268 node[2] = ((
double*)target_value)[2] - ((
double*)source_value)[2];
277 if (traceExec())
CLOG <<
"returning..." << endl;
void setGridNode(const ossimDpt &view_pt, const double *value)
◆ computeSourceValue()
Implements ossimGridRemapEngine.
Definition at line 221 of file ossimHsvGridRemapEngine.cpp.
224 static const char MODULE[]=
"ossimHsvGridRemapEngine::computeSourceValue";
225 if (traceExec())
CLOG <<
"entering..." << endl;
240 ((
double*)result)[0] = (double) hsv_vector.getH();
241 ((
double*)result)[1] = (double) hsv_vector.getS();
242 ((
double*)result)[2] = (double) hsv_vector.getV();
244 if (traceExec())
CLOG <<
"returning..." << endl;
void setR(unsigned char R)
void setB(unsigned char B)
virtual ossim_float64 computeAverageBandValue(ossim_uint32 bandNumber=0) const
This will compute the average value for the band.
void setG(unsigned char G)
◆ dup()
◆ remapTile()
Implements ossimGridRemapEngine.
Definition at line 52 of file ossimHsvGridRemapEngine.cpp.
56 static const char MODULE[] =
"ossimHsvGridRemapEngine::remapTile";
57 if (traceExec())
CLOG <<
"entering..." << endl;
66 void* red_buf = tile->
getBuf(0);
67 void* grn_buf = tile->
getBuf(1);
68 void* blu_buf = tile->
getBuf(2);
81 for (
double line=origin.line; line<origin.line+height; line+=1.0)
83 for (
double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
97 hsv_pixel.setH(hsv_pixel.getH() + gridH(samp,line));
98 hsv_pixel.setS(hsv_pixel.getS() + gridS(samp,line));
99 hsv_pixel.setV(hsv_pixel.getV() + gridV(samp,line));
104 rgb_pixel = hsv_pixel;
105 ((
ossim_uint8*)red_buf)[offset] = rgb_pixel.getR();
106 ((
ossim_uint8*)grn_buf)[offset] = rgb_pixel.getG();
107 ((
ossim_uint8*)blu_buf)[offset] = rgb_pixel.getB();
146 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)
32 bit normalized floating point
ossimDblGrid * getGrid(unsigned int index)
virtual ossimScalarType getScalarType() const
64 bit normalized floating point
16 bit unsigned integer (11 bits used)
virtual const void * getBuf() const
unsigned char ossim_uint8
16 bit unsigned integer (12 bits used)
The documentation for this class was generated from the following files: