igstk::VideoImager Class Reference

Abstract superclass for concrete IGSTK VideoImager classes. More...

#include <igstkVideoImager.h>

Inheritance diagram for igstk::VideoImager:
Inheritance graph
[legend]
Collaboration diagram for igstk::VideoImager:
Collaboration graph
[legend]

List of all members.

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 to some defined default state.
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.

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)
FrameTypeGetVideoImagerToolFrame (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.

Detailed Description

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

igstkVideoImager.png

VideoImager State Machine Diagram

Definition at line 84 of file igstkVideoImager.h.


Member Typedef Documentation

typedef for times used by the VideoImager

Definition at line 135 of file igstkVideoImager.h.

typedefs from Transform class

Definition at line 150 of file igstkVideoImager.h.

typedef Frame igstk::VideoImager::FrameType [protected]

typedefs from Frame class

Definition at line 153 of file igstkVideoImager.h.

typedef std::map< std::string, VideoImagerToolType *> igstk::VideoImager::VideoImagerToolsContainerType [protected]

typedefs from VideoImagerTool class

Definition at line 221 of file igstkVideoImager.h.


Member Enumeration Documentation

Enumerator:
FAILURE 
SUCCESS 

Reimplemented in igstk::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

Definition at line 143 of file igstkVideoImager.h.


Constructor & Destructor Documentation

igstk::VideoImager::VideoImager ( void   )  [protected]
virtual igstk::VideoImager::~VideoImager ( void   )  [protected, virtual]

Member Function Documentation

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.

virtual void igstk::VideoImager::SetThreadingEnabled ( bool  _arg  )  [protected, virtual]

SetThreadingEnabled(bool) : set m_ThreadingEnabled value.

virtual bool igstk::VideoImager::GetThreadingEnabled (  )  [protected, virtual]

GetThreadingEnabled(bool) : get m_ThreadingEnabled value.

virtual TimePeriodType igstk::VideoImager::GetValidityTime (  )  [protected, virtual]

Get the validity time.

virtual ResultType igstk::VideoImager::InternalOpen ( void   )  [protected, pure 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::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::InternalClose ( void   )  [protected, pure 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::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::InternalReset ( void   )  [protected, pure 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::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::InternalStartImaging ( void   )  [protected, pure 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::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::InternalStopImaging ( void   )  [protected, pure 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::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::InternalUpdateStatus ( void   )  [protected, pure 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::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::InternalThreadedUpdateStatus ( void   )  [protected, pure 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::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual void igstk::VideoImager::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const [protected, virtual]

Print the object information in a stream.

Reimplemented from igstk::Object.

Reimplemented in igstk::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::VerifyVideoImagerToolInformation ( const VideoImagerToolType  )  [protected, pure 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::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::ValidateSpecifiedFrequency ( double  frequencyInHz  )  [protected, virtual]

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::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::RemoveVideoImagerToolFromInternalDataContainers ( const VideoImagerToolType videoImagerTool  )  [protected, pure virtual]

This method will remove entries of the VideoImager tool from internal data containers.

Implemented in igstk::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

virtual ResultType igstk::VideoImager::AddVideoImagerToolToInternalDataContainers ( const VideoImagerToolType videoImagerTool  )  [protected, pure virtual]

Add VideoImager tool entry to internal containers.

Implemented in igstk::OpenIGTLinkVideoImager, and igstk::WebcamWinVideoImager.

const VideoImagerToolsContainerType& igstk::VideoImager::GetVideoImagerToolContainer (  )  const [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

void igstk::VideoImager::ReportImagingToolNotAvailable ( VideoImagerToolType VideoImagerTool  )  const [protected]

Report to VideoImager tool that it is not available for imaging.

void igstk::VideoImager::ReportImagingToolStreaming ( VideoImagerToolType videoImagerTool  )  const [protected]

Report to VideoImager tool that it is streaming.

void igstk::VideoImager::SetVideoImagerToolFrame ( VideoImagerToolType videoImagerTool,
FrameType frame 
) [protected]
FrameType* igstk::VideoImager::GetVideoImagerToolFrame ( VideoImagerToolType videoImagerTool  )  [protected]
void igstk::VideoImager::SetVideoImagerToolUpdate ( VideoImagerToolType videoImagerTool,
bool  flag 
) const [protected]

Turn on/off update flag of the VideoImager tool.

void igstk::VideoImager::ExitImagingStateProcessing ( void   )  [protected]

Always called when exiting imaging state.

This methold will be overriden in derived classes.

void igstk::VideoImager::ExitImagingWithoutTerminatingImagingThread (  )  [protected]

Exit imaging without terminating imaging thread.

void igstk::VideoImager::ExitImagingTerminatingImagingThread (  )  [protected]

Exit imaging after terminating imaging thread.


Member Data Documentation

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.


The documentation for this class was generated from the following file:
Generated on Tue Jul 13 11:06:52 2010 for IGSTK by  doxygen 1.6.3