IGSTK
|
Abstract superclass for concrete IGSTK VideoImager classes. More...
#include <igstkVideoImager.h>
Public Member Functions | |
void | RequestOpen (void) |
The "RequestOpen" method attempts to open communication with the imaging device. | |
void | RequestClose (void) |
The "RequestClose" method closes communication with the device. | |
void | RequestReset (void) |
The "RequestReset" method should be used to bring the VideoImager | |
void | RequestStartImaging (void) |
The "RequestStartImaging" method readies the VideoImager for imaging the tools connected to the VideoImager. | |
void | RequestStopImaging (void) |
The "RequestStopImaging" stops VideoImager from imaging the tools. | |
void | RequestSetFrequency (double frequencyInHz) |
The "RequestSetFrequency" method defines the frequency at which a frame will be queried from the VideoImager device. | |
![]() | |
virtual const char * | GetNameOfClass () const |
void | SetLogger (LoggerType *logger) |
Connect the Logger for this class. | |
void | RemoveObserver (unsigned long tag) const |
Public Attributes | |
igstkStandardAbstractClassTraitsMacro(VideoImager, Object) public typedef VideoImagerTool | VideoImagerToolType |
Macro with standard traits declarations. |
Protected Types | |
enum | ResultType { FAILURE = 0, SUCCESS } |
typedef Transform::TimePeriodType | TimePeriodType |
typedef for times used by the VideoImager | |
typedef Transform | TransformType |
typedefs from Transform class | |
typedef Frame | FrameType |
typedefs from Frame class | |
typedef std::map< std::string, VideoImagerToolType * > | VideoImagerToolsContainerType |
typedefs from VideoImagerTool class |
Protected Member Functions | |
VideoImager (void) | |
virtual | ~VideoImager (void) |
virtual void | SetThreadingEnabled (bool _arg) |
SetThreadingEnabled(bool) : set m_ThreadingEnabled value. | |
virtual bool | GetThreadingEnabled () |
GetThreadingEnabled(bool) : get m_ThreadingEnabled value. | |
virtual TimePeriodType | GetValidityTime () |
Get the validity time. | |
virtual ResultType | InternalOpen (void)=0 |
The "InternalOpen" method opens communication with an imaging device. | |
virtual ResultType | InternalClose (void)=0 |
The "InternalClose" method closes communication with an imaging device. | |
virtual ResultType | InternalReset (void)=0 |
The "InternalReset" method resets VideoImager to a known configuration. | |
virtual ResultType | InternalStartImaging (void)=0 |
The "InternalStartImaging" method starts imaging. | |
virtual ResultType | InternalStopImaging (void)=0 |
The "InternalStopImaging" method stops imaging. | |
virtual ResultType | InternalUpdateStatus (void)=0 |
The "InternalUpdateStatus" method updates VideoImager status. | |
virtual ResultType | InternalThreadedUpdateStatus (void)=0 |
The "InternalThreadedUpdateStatus" method updates VideoImager status. | |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const |
Print the object information in a stream. | |
virtual ResultType | VerifyVideoImagerToolInformation (const VideoImagerToolType *)=0 |
Verify if a VideoImager tool information is correct before attaching it to the VideoImager. | |
virtual ResultType | ValidateSpecifiedFrequency (double frequencyInHz) |
The "ValidateSpecifiedFrequency" method checks if the specified frequency is valid for the imaging device that is being used. | |
virtual ResultType | RemoveVideoImagerToolFromInternalDataContainers (const VideoImagerToolType *videoImagerTool)=0 |
This method will remove entries of the VideoImager tool from internal data containers. | |
virtual ResultType | AddVideoImagerToolToInternalDataContainers (const VideoImagerToolType *videoImagerTool)=0 |
Add VideoImager tool entry to internal containers. | |
const VideoImagerToolsContainerType & | GetVideoImagerToolContainer () const |
Access method for the VideoImager tool container. | |
void | ReportImagingToolNotAvailable (VideoImagerToolType *VideoImagerTool) const |
Report to VideoImager tool that it is not available for imaging. | |
void | ReportImagingToolStreaming (VideoImagerToolType *videoImagerTool) const |
Report to VideoImager tool that it is streaming. | |
void | SetVideoImagerToolFrame (VideoImagerToolType *videoImagerTool, FrameType *frame) |
FrameType * | GetVideoImagerToolFrame (VideoImagerToolType *videoImagerTool) |
void | SetVideoImagerToolUpdate (VideoImagerToolType *videoImagerTool, bool flag) const |
Turn on/off update flag of the VideoImager tool. | |
void | ExitImagingStateProcessing (void) |
Always called when exiting imaging state. | |
void | ExitImagingWithoutTerminatingImagingThread () |
Exit imaging without terminating imaging thread. | |
void | ExitImagingTerminatingImagingThread () |
Exit imaging after terminating imaging thread. | |
![]() | |
LoggerType * | GetLogger () const |
Object (void) | |
Constructor is protected in order to enforce the use of the New() operator. | |
virtual | ~Object (void) |
void | RegisterObservedObject (const ::igstk::Object *object, unsigned long tag) |
Register observed objects in an internal array so that they can be disconnected upon destruction. | |
void | RemoveFromObservedObjects () |
Remove observers that this object may have connected to other objects. |
Additional Inherited Members | |
![]() | |
typedef Object | Self |
General Typedefs. | |
typedef ::itk::Object | Superclass |
typedef ::itk::SmartPointer< Self > | Pointer |
typedef ::itk::SmartPointer < const Self > | ConstPointer |
typedef igstk::Logger | LoggerType |
![]() | |
static Pointer | New (void) |
Abstract superclass for concrete IGSTK VideoImager classes.
This class presents a generic interface for grabbing videostream from video-devices such Ultrasound, Endoscope, Bronchoscope, etc. The various derived subclasses of this class provide back-ends that communicate with several standard imaging systems.
The state machine of this class implements the basic state transitions of an video-imager. Inputs to the state machine are translated into method calls that can be overridden by device-specific derive classes that do the appropriate processing for a particular device.
The following diagram illustrates the state machine of the video-imager class
Definition at line 84 of file igstkVideoImager.h.
|
protected |
typedef for times used by the VideoImager
Definition at line 135 of file igstkVideoImager.h.
|
protected |
typedefs from Transform class
Definition at line 150 of file igstkVideoImager.h.
|
protected |
typedefs from Frame class
Definition at line 153 of file igstkVideoImager.h.
|
protected |
typedefs from VideoImagerTool class
Definition at line 221 of file igstkVideoImager.h.
|
protected |
Definition at line 143 of file igstkVideoImager.h.
|
protected |
|
protectedvirtual |
void igstk::VideoImager::RequestOpen | ( | void | ) |
The "RequestOpen" method attempts to open communication with the imaging device.
It generates a VideoImagerOpenEvent if successful, or a VideoImagerOpenErrorEvent if not successful.
void igstk::VideoImager::RequestClose | ( | void | ) |
The "RequestClose" method closes communication with the device.
It generates a VideoImagerCloseEvent if successful, or a VideoImagerCloseErrorEvent if not successful.
void igstk::VideoImager::RequestReset | ( | void | ) |
The "RequestReset" method should be used to bring the VideoImager
to some defined default state.
void igstk::VideoImager::RequestStartImaging | ( | void | ) |
The "RequestStartImaging" method readies the VideoImager for imaging the
tools connected to the VideoImager.
void igstk::VideoImager::RequestStopImaging | ( | void | ) |
The "RequestStopImaging" stops VideoImager from imaging the tools.
void igstk::VideoImager::RequestSetFrequency | ( | double | frequencyInHz | ) |
The "RequestSetFrequency" method defines the frequency at which a frame will be queried from the VideoImager device.
Note that VideoImager devices have their own internal frequency rate, and if you set here a frequency that is higher than what the VideoImager device is capable to follow, then you will start receiving similar frames.
|
protectedvirtual |
SetThreadingEnabled(bool) : set m_ThreadingEnabled value.
|
protectedvirtual |
GetThreadingEnabled(bool) : get m_ThreadingEnabled value.
|
protectedvirtual |
Get the validity time.
|
protectedpure virtual |
The "InternalOpen" method opens communication with an imaging device.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedpure virtual |
The "InternalClose" method closes communication with an imaging device.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedpure virtual |
The "InternalReset" method resets VideoImager to a known configuration.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedpure virtual |
The "InternalStartImaging" method starts imaging.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedpure virtual |
The "InternalStopImaging" method stops imaging.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedpure virtual |
The "InternalUpdateStatus" method updates VideoImager status.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedpure virtual |
The "InternalThreadedUpdateStatus" method updates VideoImager status.
This method is called in a separate thread. This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedvirtual |
Print the object information in a stream.
Reimplemented from igstk::Object.
Reimplemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedpure virtual |
Verify if a VideoImager tool information is correct before attaching it to the VideoImager.
This method is used to verify the information supplied by the user about the VideoImager tool. The information depends on the VideoImager type.
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedvirtual |
The "ValidateSpecifiedFrequency" method checks if the specified frequency is valid for the imaging device that is being used.
This method is to be overridden in the derived imaging-device specific classes to take into account the maximum frequency possible in the imaging device
Reimplemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedpure virtual |
This method will remove entries of the VideoImager tool from internal data containers.
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protectedpure virtual |
Add VideoImager tool entry to internal containers.
Implemented in igstk::WebcamWinVideoImager, and igstk::OpenIGTLinkVideoImager.
|
protected |
Access method for the VideoImager tool container.
This method is useful in the derived classes to access the unique identifiers of the VideoImager tools
|
protected |
Report to VideoImager tool that it is not available for imaging.
|
protected |
Report to VideoImager tool that it is streaming.
|
protected |
|
protected |
|
protected |
Turn on/off update flag of the VideoImager tool.
|
protected |
Always called when exiting imaging state.
This methold will be overriden in derived classes.
|
protected |
Exit imaging without terminating imaging thread.
|
protected |
Exit imaging after terminating imaging thread.
igstkStandardAbstractClassTraitsMacro ( VideoImager, Object ) public typedef VideoImagerTool igstk::VideoImager::VideoImagerToolType |
Macro with standard traits declarations.
typedefs from VideoImagerTool class
Definition at line 89 of file igstkVideoImager.h.