Welcome to the Harris Geospatial documentation center. Here you will find reference guides and help documents.


  >  Docs Center  >  ENVI API  >  ENVIAsyncBridgeTaskJob

ENVI

ENVIAsyncBridgeTaskJob

ENVIAsyncBridgeTaskJob

The ENVIAsyncBridgeTaskJob class is a subclass of the IDLAsyncBridgeTaskJob class for ENVI purposes. It allows the user to specify a single ENVITask that will be executed inside an IDL_IDLBridge when there are available resources. The ENVITask must have all of its input parameters specified before creating this job, as it will be cloned and dehydrated for passage to the bridge via IDL_IDLBridge::SetVar.

Examples


; Start the application
e = envi()
 
; Open a raster
File = Filepath('qb_boulder_msi', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
raster = enviUrlRaster(File)
 
numClasses = [ 3, 5, 7 ]
numJobs = N_Elements(numClasses)
 
; Construct an IDLAsyncJoin object to use for waiting on all jobs to complete
oJoin = IDLAsyncJoin()
 
; Construct IDLAsyncQueue to manage parallel execution of jobs
oQueue = IDLAsyncQueue(CONCURRENCY=numJobs)
 
; Create an object array to hold all jobs
oJobs = ObjArr(numJobs)
 
; Create a task to be used by the jobs
oTask = ENVITask('ISODataClassification')
oTask.Input_Raster = raster
 
FOR i=0, numJobs-1 DO BEGIN
  ; Update task parameters to current number of classes
  oTask.Number_of_Classes = numClasses[i]
    
        ; Construct ENVIAsyncBridgeTaskJob that clones the task, 
  ; passing in the join object.
  oJobs[i] = ENVIAsyncBridgeTaskJob(oTask, JOIN=oJoin)
ENDFOR
 
; Submit all jobs to the queue for execution
oQueue.SubmitJob, oJobs
 
; Wait for all jobs to be done
oJoin.WaitForJoin
 
; Create 4 views
v0 = e.GetView()
v1 = e.CreateView()
v2 = e.CreateView()
v3 = e.CreateView()
 
; Visualize each job output raster in a different view
l0 = v0.CreateLayer(raster)
l1 = v1.CreateLayer(oJobs[0].Task.Output_Raster)
l2 = v2.CreateLayer(oJobs[1].Task.Output_Raster)
l3 = v3.CreateLayer(oJobs[2].Task.Output_Raster)

Syntax


Result = ENVIAsyncBridgeTaskJob(Task [, JOIN=IDLAsyncJoin])

Arguments


Task

A scalar ENVITask object owned by this job, which will be executed inside an IDL_IDLBridge when Start is called.

Keywords


JOIN (optional)

An IDLAsyncJoin object that is passed to the IDLAsyncJob base class Init() method for handling.

Methods


ENVIAsyncBridgeTaskJob inherits all methods from IDLAsyncBridgeTaskJob. ENVIAsyncBridgeTaskJob also has the following method:

ENVIAsyncBridgeTaskJob::OnDone

Properties


ENVIAsyncBridgeTaskJob inherits all properties from IDLAsyncBridgeTaskJob.

Version History


5.5

Introduced

API Version


3.3

See Also


ENVIAsyncBridgeTaskJob::OnDone, ENVITask



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us