Package edu.tufts.hrilab.vision.imgproc
Class AvailableImageProcessors
java.lang.Object
javax.swing.AbstractListModel
edu.tufts.hrilab.vision.imgproc.AvailableImageProcessors
- All Implemented Interfaces:
Serializable
,ListModel
ImageProcessor Factory. This contains the ImageProcessor types available to
the system, instantiates and dispenses ImageProcessors to the system, and
manages the instantiated ImageProcessors. ImageProcessors are made available
to the system through a
getInstance
call, and all ImageProcessor clients
must notify the factory when a ImageProcessor is no longer needed by calling
release
. Basically, every getInstance
call should be paired with a
release
call.- See Also:
-
Field Summary
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
Constructor Summary
ConstructorsConstructorDescriptionAvailableImageProcessors
(int imgWidth, int imgHeight, boolean isStereo, String configFile) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addImageProcessorOption
(Symbol descriptor, ImageProcessorType type) Add an image processor option.getAll()
Should only be used by the GUI!getCapableProcessorType
(Term term) Get ImageProcessorType that matches the specified term.getElementAt
(int arg0) For AbstractListModel.getInstance
(Object client, Term term) Get ImageProcessor instance based on specified term.getInstance
(Object client, ImageProcessorType processorType) Get ImageProcessor instance based on requested ImageProcessorTypeGet set of available predicates advertised to the rest of the system.int
getSize()
For AbstractListModel.Get set of available ImageProcessorTypes available to the system.boolean
hasCapableProcessorType
(Term term) Is there an ImageProcessor that matches the specified predicate.boolean
Is there an ImageProcessor that matches the specified ImageProcessorType.void
release
(Object client, ImageProcessor processor) Client needs to let managing factory know when it's done using an ImageProcessor instance, so that ImageProcessors can be properly managed and garbage collected.Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Constructor Details
-
AvailableImageProcessors
-
-
Method Details
-
addImageProcessorOption
Add an image processor option. This is currently only used for runtime instance learning.- Parameters:
descriptor
- new description to addtype
- image processor type
-
getAll
Should only be used by the GUI!- Returns:
- container of all instantiated ImageProcessors
-
getOptions
Get set of available predicates advertised to the rest of the system. Should only be used by CameraConstrol GUI.- Returns:
-
getTypeOptions
Get set of available ImageProcessorTypes available to the system. Not all of them may be advertised as Predicates (eg, SIFT).- Returns:
-
hasCapableProcessorType
Is there an ImageProcessor that matches the specified predicate.- Parameters:
term
- - Predicate description- Returns:
- - if one exists.
-
hasCapableProcessorType
Is there an ImageProcessor that matches the specified ImageProcessorType.- Parameters:
type
-- Returns:
- - if type exists.
-
getCapableProcessorType
Get ImageProcessorType that matches the specified term.- Parameters:
term
- - Predicate description- Returns:
- - ImageProcessorType that "matches" term. Null if no match.
-
getInstance
Get ImageProcessor instance based on specified term. Returns null if a match cannot be found.- Parameters:
client
-term
-- Returns:
-
getInstance
Get ImageProcessor instance based on requested ImageProcessorType- Parameters:
client
-processorType
-- Returns:
-
release
Client needs to let managing factory know when it's done using an ImageProcessor instance, so that ImageProcessors can be properly managed and garbage collected. -
getElementAt
For AbstractListModel. To expose imageProcesstYpes to UI.- Parameters:
arg0
-- Returns:
-
getSize
public int getSize()For AbstractListModel. To expose imageProcesstYpes to UI.- Returns:
-