SPATMOD::IMAGE::FILTER Class Reference

Base class for image filter. More...

#include <spatmod/imagefilter.h>

Inheritance diagram for SPATMOD::IMAGE::FILTER:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~FILTER ()

Protected Member Functions

 FILTER (unsigned NumPreviousStages)
 FILTER (STAGE_ARRAY &PreviousStages, bool TakeOwnership)
 FILTER (STAGE *pPreviousStage, bool TakeOwnership)
ERRVALUE CreateWorkBuffer (UINT32 NumColumns, UINT32 NumRows, unsigned index=0)
ERRVALUE CreateWorkBuffers (UINT32 NumColumns, UINT32 NumRows)
void DestroyWorkBuffer (unsigned index=0)
void DestroyWorkBuffers ()
unsigned GetNumPreviousStages () const
STAGEGetPreviousStage (unsigned index=0) const
bool GetPreviousStageOwnership (unsigned index=0) const
BUFFERGetWorkBuffer (unsigned index=0) const
bool IsAutoCreateWorkBuffers () const
void SetAutoCreateWorkBuffers (bool AutoCreateWorkBuffers=true)
void SetAutoDestroyWorkBuffers (bool AutoDestroyWorkBuffers)
void SetPreviousStage (unsigned index, STAGE *pPreviousStage, bool TakeOwnership)
virtual ERRVALUE v_GetDimensions (DIMENSIONS &dimensions, double zoom) const
virtual ERRVALUE v_GetGeoreference (GEOREFERENCE &georeference, double zoom) const
virtual const PIXELTABLEv_GetPixelLookupTable () const
virtual ZOOMABILITY v_GetZoomAbility (SIMPLE_ARRAY< double > &ZoomsAllowed) const
virtual ERRVALUE v_PullBegin (const SECTION_ITERATOR &iterator)
virtual ERRVALUE v_PullEnd ()
virtual float v_QueryIterator (const SECTION_ITERATOR &iterator) const

Detailed Description

Base class for image filter.


Constructor & Destructor Documentation

virtual SPATMOD::IMAGE::FILTER::~FILTER (  )  [virtual]
SPATMOD::IMAGE::FILTER::FILTER ( STAGE pPreviousStage,
bool  TakeOwnership 
) [protected]

Simple constructor for filter with one previous stage Does not set any base properties, derived class constructor should do so.

Parameters:
pPreviousStage Pointer to previous stage
TakeOwnership Filter takes ownership of previous stage and will delete when needed
SPATMOD::IMAGE::FILTER::FILTER ( STAGE_ARRAY PreviousStages,
bool  TakeOwnership 
) [protected]

Construct using array of previous stage pointers and common ownership.

Does not set any base properties, derived class constructor should do so.

Parameters:
PreviousStages Array of previous stages
TakeOwnership Filter takes ownership of previous stages and will delete when needed
SPATMOD::IMAGE::FILTER::FILTER ( unsigned  NumPreviousStages  )  [protected]

Construct with specified number of previous stages.

Does not set any base properties, derived class constructor should do so. Does not assign any stages, derived class constructor must call SetPreviousStage for each previous stage. Used primarily when array of stage pointers is not already available, eg for derived filter taking fixed number of previous stages.


Member Function Documentation

ERRVALUE SPATMOD::IMAGE::FILTER::CreateWorkBuffer ( UINT32  NumColumns,
UINT32  NumRows,
unsigned  index = 0 
) [protected]

Create work buffer with specified size using properties from stage index.

Parameters:
NumColumns Number of columns in buffer
NumRows Number of rows in buffer
index Index to stage, 0 for first
ERRVALUE SPATMOD::IMAGE::FILTER::CreateWorkBuffers ( UINT32  NumColumns,
UINT32  NumRows 
) [protected]

Create work buffers for all previous stages with specified size.

Parameters:
NumColumns Number of columns in buffer
NumRows Number of rows in buffer
void SPATMOD::IMAGE::FILTER::DestroyWorkBuffer ( unsigned  index = 0  )  [protected]

Destroy work buffer for specified input stage if any.

Parameters:
index Index to stage, 0 for first
void SPATMOD::IMAGE::FILTER::DestroyWorkBuffers (  )  [protected]

Destroy all work buffers.

unsigned SPATMOD::IMAGE::FILTER::GetNumPreviousStages (  )  const [inline, protected]

Get number of previous stages.

STAGE* SPATMOD::IMAGE::FILTER::GetPreviousStage ( unsigned  index = 0  )  const [inline, protected]

Get pointer to previous stage in pipeline.

Parameters:
index Index to stage, 0 for first
bool SPATMOD::IMAGE::FILTER::GetPreviousStageOwnership ( unsigned  index = 0  )  const [inline, protected]

Get ownership of previous stage in pipeline.

Parameters:
index Index to stage, 0 for first
BUFFER& SPATMOD::IMAGE::FILTER::GetWorkBuffer ( unsigned  index = 0  )  const [inline, protected]

Get reference to work buffer for input stage.

The buffer must be created first using CreateWorkBuffer().

Parameters:
index Index to stage, 0 for first
bool SPATMOD::IMAGE::FILTER::IsAutoCreateWorkBuffers (  )  const [inline, protected]

Determine if will automatically manage work buffers.

void SPATMOD::IMAGE::FILTER::SetAutoCreateWorkBuffers ( bool  AutoCreateWorkBuffers = true  )  [inline, protected]

Set filter to automatically create work buffers for all input stages in v_PullBegin.

If set, work buffers will be created by v_PullBegin using maximum dimensions from iterator. By default if this method is not called, work buffers will not be automatically created.

void SPATMOD::IMAGE::FILTER::SetAutoDestroyWorkBuffers ( bool  AutoDestroyWorkBuffers  )  [inline, protected]

Set filter to automatically destroy work buffers for all input stages in v_PullEnd.

By default if this method is not called, work buffers will be automatically destroyed.

void SPATMOD::IMAGE::FILTER::SetPreviousStage ( unsigned  index,
STAGE pPreviousStage,
bool  TakeOwnership 
) [protected]

Set previous stage pointer.

Parameters:
index Index to stage, 0 for first
pPreviousStage Pointer to previous stage
TakeOwnership Filter takes ownership of previous stage and will delete when needed
virtual ERRVALUE SPATMOD::IMAGE::FILTER::v_GetDimensions ( DIMENSIONS dimensions,
double  zoom 
) const [protected, virtual]

Get dimensions at specified zoom value.

Default implementation returns result of GetDimensions on first input stage.

Parameters:
dimensions Dimensions returned
zoom Zoom/magnification factor

Reimplemented from SPATMOD::IMAGE::BASE.

virtual ERRVALUE SPATMOD::IMAGE::FILTER::v_GetGeoreference ( GEOREFERENCE georeference,
double  zoom 
) const [protected, virtual]

Get georeference at specified zoom value.

Default implementation returns georeference from first input stage.

Reimplemented from SPATMOD::IMAGE::BASE.

virtual const PIXELTABLE* SPATMOD::IMAGE::FILTER::v_GetPixelLookupTable (  )  const [protected, virtual]

Get pixel lookup table.

Default implementation returns pointer if set and image has PIXEL::TYPE_Indexed, otherwise calls previous stage method.

Reimplemented from SPATMOD::IMAGE::BASE.

virtual ZOOMABILITY SPATMOD::IMAGE::FILTER::v_GetZoomAbility ( SIMPLE_ARRAY< double > &  ZoomsAllowed  )  const [protected, virtual]

Query image for support of specified zoom value.

Default implementation determines zoomability for each input stage and resolves to minimum allowed set.

Parameters:
ZoomsAllowed Zoom values allowed, interpretation depends on return value

Reimplemented from SPATMOD::IMAGE::BASE.

virtual ERRVALUE SPATMOD::IMAGE::FILTER::v_PullBegin ( const SECTION_ITERATOR iterator  )  [protected, virtual]

Begin pull of a specific section.

Default implementation calls PullBegin() for earlier stages in pipeline. If derived class overrides it must either call the base v_PullBegin() with either the same iterator on one that has been suitably adjusted based on the filter's behavior, or call PullBegin() for all earlier stages directly. This would typically be done before doing any filter-specific processing.

Parameters:
iterator SubSection iterator to be used

Implements SPATMOD::IMAGE::STAGE.

Reimplemented in SPATMOD::IMAGE::FILTER_FOCAL, SPATMOD::IMAGE::FILTER_FOCALTOPOGRAPHIC, SPATMOD::IMAGE::FILTER_FUSION, SPATMOD::IMAGE::FILTER_MORPHOLOGY_DILATION, and SPATMOD::IMAGE::FILTER_MORPHOLOGY_EROSION.

virtual ERRVALUE SPATMOD::IMAGE::FILTER::v_PullEnd (  )  [protected, virtual]

Finish pulling subsections.

Default implementation calls PullEnd() for earlier stages in pipeline. If derived class overrides it must either call the base v_PullEnd(), or call PullEnd() for all earlier stages directly. This would typically be done after doing any filter-specific processing.

Implements SPATMOD::IMAGE::STAGE.

virtual float SPATMOD::IMAGE::FILTER::v_QueryIterator ( const SECTION_ITERATOR iterator  )  const [protected, virtual]

Query support/efficiency for specified iterator.

Returns:
Efficiency between 0 and 1, 0 indicates not supported, 1 indicates most efficient. Default implementation returns product of QueryIterator for each of input pipeline stages, taking into account differences in tile size if any. If any source images do not have the same dimensions as the filter image instance then 0 will always be returned and derived class must override.
Parameters:
iterator Iterator

Reimplemented from SPATMOD::IMAGE::BASE.


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

Generated on Sun Oct 7 21:39:32 2012 for TNTsdk 2012 by  doxygen 1.6.1