IGSTK
Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | List of all members
igstk::VideoImager Class Referenceabstract

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]

Public Member Functions

void RequestOpen (void)
 The "RequestOpen" method attempts to open communication with the imaging device. More...
 
void RequestClose (void)
 The "RequestClose" method closes communication with the device. More...
 
void RequestReset (void)
 The "RequestReset" method should be used to bring the VideoImager to some defined default state. More...
 
void RequestStartImaging (void)
 The "RequestStartImaging" method readies the VideoImager for imaging the tools connected to the VideoImager. More...
 
void RequestStopImaging (void)
 The "RequestStopImaging" stops VideoImager from imaging the tools. More...
 
void RequestSetFrequency (double frequencyInHz)
 The "RequestSetFrequency" method defines the frequency at which a frame will be queried from the VideoImager device. More...
 
- Public Member Functions inherited from igstk::Object
virtual const char * GetNameOfClass () const
 
void SetLogger (LoggerType *logger)
 Connect the Logger for this class. More...
 
void RemoveObserver (unsigned long tag) const
 

Public Attributes

igstkStandardAbstractClassTraitsMacro(VideoImager,
Object) public typedef
VideoImagerTool 
VideoImagerToolType
 Macro with standard traits declarations. More...
 

Protected Types

enum  ResultType { FAILURE =0, SUCCESS }
 
typedef Transform::TimePeriodType TimePeriodType
 typedef for times used by the VideoImager More...
 
typedef Transform TransformType
 typedefs from Transform class More...
 
typedef Frame FrameType
 typedefs from Frame class More...
 
typedef std::map< std::string,
VideoImagerToolType * > 
VideoImagerToolsContainerType
 typedefs from VideoImagerTool class More...
 

Protected Member Functions

 VideoImager (void)
 
virtual ~VideoImager (void)
 
virtual void SetThreadingEnabled (bool _arg)
 SetThreadingEnabled(bool) : set m_ThreadingEnabled value. More...
 
virtual bool GetThreadingEnabled ()
 GetThreadingEnabled(bool) : get m_ThreadingEnabled value. More...
 
virtual TimePeriodType GetValidityTime ()
 Get the validity time. More...
 
virtual ResultType InternalOpen (void)=0
 The "InternalOpen" method opens communication with an imaging device. More...
 
virtual ResultType InternalClose (void)=0
 The "InternalClose" method closes communication with an imaging device. More...
 
virtual ResultType InternalReset (void)=0
 The "InternalReset" method resets VideoImager to a known configuration. More...
 
virtual ResultType InternalStartImaging (void)=0
 The "InternalStartImaging" method starts imaging. More...
 
virtual ResultType InternalStopImaging (void)=0
 The "InternalStopImaging" method stops imaging. More...
 
virtual ResultType InternalUpdateStatus (void)=0
 The "InternalUpdateStatus" method updates VideoImager status. More...
 
virtual ResultType InternalThreadedUpdateStatus (void)=0
 The "InternalThreadedUpdateStatus" method updates VideoImager status. More...
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
 Print the object information in a stream. More...
 
virtual ResultType VerifyVideoImagerToolInformation (const VideoImagerToolType *)=0
 Verify if a VideoImager tool information is correct before attaching it to the VideoImager. More...
 
virtual ResultType ValidateSpecifiedFrequency (double frequencyInHz)
 The "ValidateSpecifiedFrequency" method checks if the specified frequency is valid for the imaging device that is being used. More...
 
virtual ResultType RemoveVideoImagerToolFromInternalDataContainers (const VideoImagerToolType *videoImagerTool)=0
 This method will remove entries of the VideoImager tool from internal data containers. More...
 
virtual ResultType AddVideoImagerToolToInternalDataContainers (const VideoImagerToolType *videoImagerTool)=0
 Add VideoImager tool entry to internal containers. More...
 
const
VideoImagerToolsContainerType
GetVideoImagerToolContainer () const
 Access method for the VideoImager tool container. More...
 
void ReportImagingToolNotAvailable (VideoImagerToolType *VideoImagerTool) const
 Report to VideoImager tool that it is not available for imaging. More...
 
void ReportImagingToolStreaming (VideoImagerToolType *videoImagerTool) const
 Report to VideoImager tool that it is streaming. More...
 
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. More...
 
void ExitImagingStateProcessing (void)
 Always called when exiting imaging state. More...
 
void ExitImagingWithoutTerminatingImagingThread ()
 Exit imaging without terminating imaging thread. More...
 
void ExitImagingTerminatingImagingThread ()
 Exit imaging after terminating imaging thread. More...
 
- Protected Member Functions inherited from igstk::Object
LoggerTypeGetLogger () const
 
 Object (void)
 Constructor is protected in order to enforce the use of the New() operator. More...
 
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. More...
 
void RemoveFromObservedObjects ()
 Remove observers that this object may have connected to other objects. More...
 

Additional Inherited Members

- Public Types inherited from igstk::Object
typedef Object Self
 General Typedefs. More...
 
typedef ::itk::Object Superclass
 
typedef ::itk::SmartPointer< SelfPointer
 
typedef ::itk::SmartPointer
< const Self
ConstPointer
 
typedef igstk::Logger LoggerType
 
- Static Public Member Functions inherited from igstk::Object
static Pointer New (void)
 

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.

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 

Definition at line 143 of file igstkVideoImager.h.

Constructor & Destructor Documentation

igstk::VideoImager::VideoImager ( void  )
protected
virtual igstk::VideoImager::~VideoImager ( void  )
protectedvirtual

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)
protectedvirtual

SetThreadingEnabled(bool) : set m_ThreadingEnabled value.

virtual bool igstk::VideoImager::GetThreadingEnabled ( )
protectedvirtual

GetThreadingEnabled(bool) : get m_ThreadingEnabled value.

virtual TimePeriodType igstk::VideoImager::GetValidityTime ( )
protectedvirtual

Get the validity time.

virtual ResultType igstk::VideoImager::InternalOpen ( void  )
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.

virtual ResultType igstk::VideoImager::InternalClose ( void  )
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.

virtual ResultType igstk::VideoImager::InternalReset ( void  )
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.

virtual ResultType igstk::VideoImager::InternalStartImaging ( void  )
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.

virtual ResultType igstk::VideoImager::InternalStopImaging ( void  )
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.

virtual ResultType igstk::VideoImager::InternalUpdateStatus ( void  )
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.

virtual ResultType igstk::VideoImager::InternalThreadedUpdateStatus ( void  )
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.

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

Print the object information in a stream.

Reimplemented from igstk::Object.

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

virtual ResultType igstk::VideoImager::VerifyVideoImagerToolInformation ( const VideoImagerToolType )
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.

virtual ResultType igstk::VideoImager::ValidateSpecifiedFrequency ( double  frequencyInHz)
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.

virtual ResultType igstk::VideoImager::RemoveVideoImagerToolFromInternalDataContainers ( const VideoImagerToolType videoImagerTool)
protectedpure virtual

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

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

virtual ResultType igstk::VideoImager::AddVideoImagerToolToInternalDataContainers ( const VideoImagerToolType videoImagerTool)
protectedpure virtual

Add VideoImager tool entry to internal containers.

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

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: