OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | List of all members
ossimHlzTool::NormPatchProcessorJob Class Reference

#include <ossimHlzTool.h>

Inheritance diagram for ossimHlzTool::NormPatchProcessorJob:
ossimHlzTool::PatchProcessorJob ossimJob

Public Member Functions

 NormPatchProcessorJob (ossimHlzTool *hlzUtil, const ossimIpt &origin, ossim_uint32 chip_id=0)
 
virtual bool level1Test ()
 
- Public Member Functions inherited from ossimHlzTool::PatchProcessorJob
 PatchProcessorJob (ossimHlzTool *hlzUtil, const ossimIpt &origin, ossim_uint32 chip_id=0)
 
bool level2Test ()
 
bool maskTest ()
 
- Public Member Functions inherited from ossimJob
 ossimJob ()
 
virtual void start ()
 Main entry point to the job. More...
 
std::shared_ptr< ossimJobgetSharedFromThis ()
 This is a convenience method to get the shared representation of this pointer. More...
 
std::shared_ptr< const ossimJobgetSharedFromThis () const
 This is a convenience method to get the shared representation of this pointer. More...
 
void setPercentComplete (double value)
 When the pernet complete is set for the job it will call any callbacks and nofity percentCompleteChanged. More...
 
void setPriority (double value)
 sets the priority of the job More...
 
double priority () const
 
virtual void release ()
 If derived interfaces implement a block this will allow one to release. More...
 
State state () const
 
virtual void resetState (int value)
 Will clear out the state and the call setState. More...
 
virtual void setState (int value, bool on=true)
 Will allow you to set the state of the job. More...
 
bool isCanceled () const
 
virtual void cancel ()
 Sets the state if the object as cancelled. More...
 
virtual void ready ()
 Sets the state if the object as ready. More...
 
virtual void running ()
 Sets the state if the object as running. More...
 
virtual void finished ()
 Sets the state if the object as finished. More...
 
bool isReady () const
 
bool isStopped () const
 
bool isFinished () const
 
bool isRunning () const
 
void setCallback (std::shared_ptr< ossimJobCallback > callback)
 
void setName (const ossimString &value)
 Sets the name of a job. More...
 
const ossimStringname () const
 
void setId (const ossimString &value)
 
const ossimStringid () const
 
void setDescription (const ossimString &value)
 
const ossimStringdescription () const
 
std::shared_ptr< ossimJobCallbackcallback ()
 

Additional Inherited Members

- Public Types inherited from ossimJob
enum  State {
  ossimJob_NONE = 0, ossimJob_READY = 1, ossimJob_RUNNING = 2, ossimJob_CANCEL = 4,
  ossimJob_FINISHED = 8, ossimJob_ALL = (ossimJob_READY|ossimJob_RUNNING|ossimJob_CANCEL|ossimJob_FINISHED)
}
 
This is a Bit vector. More...
 
typedef std::list< std::shared_ptr< ossimJob > > List
 
- Public Attributes inherited from ossimHlzTool::PatchProcessorJob
ossimHlzToolm_hlzUtil
 
ossimIpt m_demPatchUL
 
ossimIpt m_demPatchLR
 
ossim_uint8 m_status
 
float m_nullValue
 
- Static Public Attributes inherited from ossimHlzTool::PatchProcessorJob
static std::mutex m_bufMutex
 
- Protected Member Functions inherited from ossimHlzTool::PatchProcessorJob
virtual void run ()
 Abstract method and must be overriden by the base class. More...
 
- Protected Attributes inherited from ossimJob
std::mutex m_jobMutex
 
ossimString m_name
 
ossimString m_description
 
ossimString m_id
 
State m_state
 
double m_priority
 
std::shared_ptr< ossimJobCallbackm_callback
 

Detailed Description

Definition at line 133 of file ossimHlzTool.h.

Constructor & Destructor Documentation

◆ NormPatchProcessorJob()

ossimHlzTool::NormPatchProcessorJob::NormPatchProcessorJob ( ossimHlzTool hlzUtil,
const ossimIpt origin,
ossim_uint32  chip_id = 0 
)
inline

Definition at line 136 of file ossimHlzTool.h.

137  : PatchProcessorJob(hlzUtil, origin, chip_id) {}
PatchProcessorJob(ossimHlzTool *hlzUtil, const ossimIpt &origin, ossim_uint32 chip_id=0)

Member Function Documentation

◆ level1Test()

bool ossimHlzTool::NormPatchProcessorJob::level1Test ( )
virtual

Implements ossimHlzTool::PatchProcessorJob.

Definition at line 627 of file ossimHlzTool.cpp.

References ossim::isnan(), ossimIpt::x, and ossimIpt::y.

628 {
629  // The processing chain is outputing slope values in degrees from vertical.
630  // Scan the data tile for slopes outside the threshold:
631  ossimIpt p;
632  float theta;
633  for (p.y = m_demPatchUL.y; p.y < m_demPatchLR.y; ++p.y)
634  {
635  for (p.x = m_demPatchUL.x; p.x < m_demPatchLR.x; ++p.x)
636  {
637  theta = m_hlzUtil->m_demBuffer->getPix(p, 0);
638  if ((theta == m_nullValue) || ossim::isnan(theta) || (theta > m_hlzUtil->m_slopeThreshold))
639  return false;
640  }
641  }
642 
643  m_status = 1; // indicates passed level 1
644  return true;
645 }
double m_slopeThreshold
Definition: ossimHlzTool.h:78
virtual ossim_float64 getPix(const ossimIpt &position, ossim_uint32 band=0) const
Will return the pixel at location position.
ossimRefPtr< ossimImageData > m_demBuffer
Definition: ossimHlzTool.h:83
ossim_int32 y
Definition: ossimIpt.h:142
ossim_int32 x
Definition: ossimIpt.h:141
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91

The documentation for this class was generated from the following files: