21 static const char* SMOOTHNESS_FACTOR_KW=
"smoothness_factor";
29 theTrackScaleFlag(
true),
32 theSmoothnessFactor(1.0)
40 theTrackScaleFlag(
true),
43 theSmoothnessFactor(1.0)
76 if(!input||(input->getDataObjectStatus()==
OSSIM_EMPTY)||!input->getBuf())
210 T* inbuf = (T*) inputTile->
getBuf();
212 double* normX = (
double*)outputTile->
getBuf(0);
213 double* normY = (
double*)outputTile->
getBuf(1);
214 double* normZ = (
double*)outputTile->
getBuf(2);
219 bool valid_component =
true;
235 if (inbuf[i+1] != inputNull)
237 if (inbuf[i-1] != inputNull)
239 else if (inbuf[i] != inputNull)
242 else if ((inbuf[i] != inputNull) && (inbuf[i-1] != inputNull))
248 valid_component =
false;
254 if (inbuf[i+inbuf_width] != inputNull)
256 if (inbuf[i-inbuf_width] != inputNull)
258 else if (inbuf[i] != inputNull)
261 else if ((inbuf[i] != inputNull) && (inbuf[i-inbuf_width] != inputNull))
267 valid_component =
false;
274 normal = normal.
unit();
275 normX[
n] = normal[0];
276 normY[
n] = normal[1];
277 normZ[
n] = normal[2];
281 normX[
n] = outputNull;
282 normY[
n] = outputNull;
283 normZ[
n] = outputNull;
288 valid_component =
true;
322 const char* prefix)
const 340 SMOOTHNESS_FACTOR_KW,
427 if((name ==
"smoothnessFactor")||
433 else if(name ==
"xscale")
435 theXScale =
property->valueToString().toDouble();
438 else if(name ==
"yscale")
440 theYScale =
property->valueToString().toDouble();
443 else if(name ==
"autoTrackScaleFlag")
456 if((name ==
"smoothnessFactor")||
463 else if(name ==
"xscale")
469 else if(name ==
"yscale")
475 else if(name ==
"autoTrackScaleFlag")
488 propertyNames.push_back(
"gain");
489 propertyNames.push_back(
"xscale");
490 propertyNames.push_back(
"yscale");
491 propertyNames.push_back(
"autoTrackScaleFlag");
16 bit unsigned integer (15 bits used)
virtual ossim_uint32 getWidth() const
virtual bool isSourceEnabled() const
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual void setImageRectangle(const ossimIrect &rect)
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
const char * find(const char *key) const
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
static ossimString toString(bool aValue)
Numeric to string methods.
ossimColumnVector3d unit() const
const ossimIpt & ul() const
virtual ossim_uint32 getHeight() const
double getSmoothnessFactor() const
16 bit unsigned integer (14 bits used)
16 bit unsigned integer (13 bits used)
double theSmoothnessFactor
unsigned short ossim_uint16
virtual void initialize()
Initialize the data buffer.
bool getTrackScaleFlag() const
virtual ossimObject * dup() const
bool completely_within(const ossimIrect &rect) const
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
static const char * SCALE_PER_PIXEL_X_KW
static ossimImageDataFactory * instance()
ossimImageToPlaneNormalFilter()
ossimRefPtr< ossimImageData > theTile
virtual ossimDataObjectStatus validate() const
signed short ossim_sint16
bool loadState(const ossimKeywordlist &kwl, const char *prefix)
Method to the load (recreate) the state of an object from a keyword list.
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
os2<< "> n<< " > nendobj n
bool toBool() const
String to numeric methods.
virtual ossim_uint32 getSizePerBand() const
Returns the number of pixels in a single band in a tile.
ossimImageSource * theInputConnection
unsigned int ossim_uint32
virtual const ossim_float64 * getNullPix() const
32 bit normalized floating point
ossimDpt getMetersPerPixel() const
Returns the GSD associated with this image in the active projection.
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
void setTrackScaleFlag(bool flag)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
RTTI_DEF1(ossimImageToPlaneNormalFilter, "ossimImageToPlaneNormalFilter", ossimImageSourceFilter)
const ossimIpt & lr() const
virtual void initialize()
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
void setXScale(const double &scale)
virtual ossimScalarType getScalarType() const
64 bit normalized floating point
ossimIrect theInputBounds
16 bit unsigned integer (11 bits used)
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
void setYScale(const double &scale)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual const void * getBuf() const
void setSmoothnessFactor(double value)
void computeNormalsTemplate(T inputScalarTypeDummy, ossimRefPtr< ossimImageData > &inputTile, ossimRefPtr< ossimImageData > &outputTile)
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
virtual void initialize()=0
virtual void computeNormals(ossimRefPtr< ossimImageData > &inputTile, ossimRefPtr< ossimImageData > &outputTile)
static const char * SCALE_PER_PIXEL_Y_KW
bool saveState(ossimKeywordlist &kwl, const char *prefix) const
Method to save the state of an object to a keyword list.
virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt &result) const
Will return the decimation factor for the given resolution level.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, ossim_uint32 resLevel=0)
unsigned char ossim_uint8
ossimRefPtr< ossimImageData > theBlankTile
void setCacheRefreshBit()
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)
16 bit unsigned integer (12 bits used)