VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkGeoSource Class Referenceabstract

A multi-resolution geographic data source. More...

#include <vtkGeoSource.h>

Inheritance diagram for vtkGeoSource:
[legend]

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkGeoSourceNewInstance () const
 
 vtkGeoSource ()
 
 ~vtkGeoSource ()
 
void Initialize (int numThreads=1)
 
void ShutDown ()
 
void WorkerThread ()
 
virtual vtkAbstractTransformGetTransform ()
 
virtual bool FetchRoot (vtkGeoTreeNode *root)=0
 
virtual bool FetchChild (vtkGeoTreeNode *node, int index, vtkGeoTreeNode *child)=0
 
virtual void RequestChildren (vtkGeoTreeNode *node)
 
virtual vtkCollection * GetRequestedNodes (vtkGeoTreeNode *node)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkGeoSourceSafeDownCast (vtkObjectBase *o)
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 

Protected Attributes

vtkCollection * InputSet
 
vtkCollection * ProcessingSet
 
vtkMutexLock * Lock
 
vtkConditionVariable * Condition
 
vtkMultiThreader * Threader
 
bool StopThread
 
bool Initialized
 
implementation * Implementation
 
vtkMutexLock * InputSetLock
 
vtkMutexLock * ProcessingSetLock
 
vtkMutexLock * OutputSetLock
 

Detailed Description

A multi-resolution geographic data source.

vtkGeoSource is an abstract superclass for all multi-resolution data sources shown in a geographic view like vtkGeoView or vtkGeoView2D. vtkGeoSource subclasses need to implement the FetchRoot() method, which fills a vtkGeoTreeNode with the low-res data at the root, and FetchChild(), which produces a refinement of a parent node. Other geovis classes such as vtkGeoTerrain, vtkGeoTerrain2D, and vtkGeoAlignedImageSource use a vtkGeoSource subclass to build their geometry or image caches which are stored in trees. The source itself does not maintain the tree, but simply provides a mechanism for generating refined tree nodes.

Sources are multi-threaded. Each source may have one or more worker threads associated with it, which this superclass manages. It is essential that the FetchChild() method is thread-safe, since it may be called from multiple workers simultaneously.

Tests:
vtkGeoSource (Tests)

Definition at line 56 of file vtkGeoSource.h.

Member Typedef Documentation

typedef vtkObject vtkGeoSource::Superclass

Definition at line 59 of file vtkGeoSource.h.

Constructor & Destructor Documentation

vtkGeoSource::vtkGeoSource ( )
vtkGeoSource::~vtkGeoSource ( )

Member Function Documentation

static int vtkGeoSource::IsTypeOf ( const char *  type)
static
virtual int vtkGeoSource::IsA ( const char *  type)
virtual
static vtkGeoSource* vtkGeoSource::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkGeoSource::NewInstanceInternal ( ) const
protectedvirtual
vtkGeoSource* vtkGeoSource::NewInstance ( ) const
virtual bool vtkGeoSource::FetchRoot ( vtkGeoTreeNode root)
pure virtual

Blocking access methods to be implemented in subclasses.

Implemented in vtkGeoAlignedImageSource, vtkGeoProjectionSource, vtkGeoFileImageSource, vtkGeoFileTerrainSource, and vtkGeoGlobeSource.

virtual bool vtkGeoSource::FetchChild ( vtkGeoTreeNode node,
int  index,
vtkGeoTreeNode child 
)
pure virtual

Blocking access methods to be implemented in subclasses.

Implemented in vtkGeoAlignedImageSource, vtkGeoFileImageSource, vtkGeoFileTerrainSource, vtkGeoProjectionSource, and vtkGeoGlobeSource.

virtual void vtkGeoSource::RequestChildren ( vtkGeoTreeNode node)
virtual

Non-blocking methods for to use from the main application. After calling RequestChildren() for a certain node, GetRequestedNodes() will after a certain period of time return a non-null pointer to a collection of four vtkGeoTreeNode objects, which are the four children of the requested node. The collection is reference counted, so you need to eventually call Delete() on the returned collection pointer (if it is non-null).

virtual vtkCollection* vtkGeoSource::GetRequestedNodes ( vtkGeoTreeNode node)
virtual

Non-blocking methods for to use from the main application. After calling RequestChildren() for a certain node, GetRequestedNodes() will after a certain period of time return a non-null pointer to a collection of four vtkGeoTreeNode objects, which are the four children of the requested node. The collection is reference counted, so you need to eventually call Delete() on the returned collection pointer (if it is non-null).

void vtkGeoSource::Initialize ( int  numThreads = 1)

Spawn worker threads.

void vtkGeoSource::ShutDown ( )

Shut down the source. This terminates the thread and releases memory.

void vtkGeoSource::WorkerThread ( )
virtual vtkAbstractTransform* vtkGeoSource::GetTransform ( )
inlinevirtual

Return the projection transformation used by this source.

Reimplemented in vtkGeoProjectionSource.

Definition at line 91 of file vtkGeoSource.h.

Member Data Documentation

vtkCollection* vtkGeoSource::InputSet
protected

Definition at line 95 of file vtkGeoSource.h.

vtkCollection* vtkGeoSource::ProcessingSet
protected

Definition at line 96 of file vtkGeoSource.h.

vtkMutexLock* vtkGeoSource::InputSetLock
protected

Locks the set for reading or writing

Definition at line 100 of file vtkGeoSource.h.

vtkMutexLock* vtkGeoSource::ProcessingSetLock
protected

Locks the set for reading or writing

Definition at line 101 of file vtkGeoSource.h.

vtkMutexLock* vtkGeoSource::OutputSetLock
protected

Locks the set for reading or writing

Definition at line 102 of file vtkGeoSource.h.

vtkMutexLock* vtkGeoSource::Lock
protected

Definition at line 105 of file vtkGeoSource.h.

vtkConditionVariable* vtkGeoSource::Condition
protected

Definition at line 107 of file vtkGeoSource.h.

vtkMultiThreader* vtkGeoSource::Threader
protected

Definition at line 109 of file vtkGeoSource.h.

bool vtkGeoSource::StopThread
protected

Definition at line 110 of file vtkGeoSource.h.

bool vtkGeoSource::Initialized
protected

Definition at line 111 of file vtkGeoSource.h.

implementation* vtkGeoSource::Implementation
protected

Definition at line 114 of file vtkGeoSource.h.


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