PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPlusWin32VideoSource2 Class Reference

Video-for-Windows video digitizer. More...

#include <src/PlusDataCollection/VideoForWindows/vtkPlusWin32VideoSource2.h>

Inheritance diagram for vtkPlusWin32VideoSource2:
Inheritance graph
[legend]
Collaboration diagram for vtkPlusWin32VideoSource2:
Collaboration graph
[legend]

Public Types

typedef vtkPlusDevice Superclass
 
- Public Types inherited from vtkPlusDevice
typedef vtkImageAlgorithm Superclass
 

Public Member Functions

PlusStatus AddFrameToBuffer (void *lpVideoHeader)
 
virtual const char * GetClassName ()
 
virtual int GetPreview ()
 
virtual int IsA (const char *type)
 
virtual bool IsTracker () const
 
virtual PlusStatus NotifyConfigured ()
 
void OnParentWndDestroy ()
 
virtual void PreviewOff ()
 
virtual void PreviewOn ()
 
virtual void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
virtual PlusStatus SetAcquisitionRate (double rate)
 
virtual PlusStatus SetFrameSize (const FrameSizeType &frameSize)
 
virtual PlusStatus SetOutputFormat (int format)
 
void SetPreview (int showPreview)
 
PlusStatus VideoFormatDialog ()
 
PlusStatus VideoSourceDialog ()
 
- Public Member Functions inherited from vtkPlusDevice
PlusStatus AddFieldDataSource (vtkPlusDataSource *aSource)
 
PlusStatus AddInputChannel (vtkPlusChannel *aChannel)
 
PlusStatus AddOutputChannel (vtkPlusChannel *aChannel)
 
PlusStatus AddTool (vtkPlusDataSource *tool, bool requireUniquePortName=true)
 
PlusStatus AddVideoSource (vtkPlusDataSource *anImage)
 
void ClearAllBuffers ()
 
virtual PlusStatus Connect ()
 
virtual PlusStatus CreateDefaultOutputChannel (const char *channelId=NULL, bool addSource=true)
 
void DeepCopy (const vtkPlusDevice &device)
 
virtual PlusStatus Disconnect ()
 
virtual PlusStatus ForceUpdate ()
 
virtual double GetAcquisitionRate () const
 
virtual PlusStatus GetBufferSize (vtkPlusChannel &aChannel, int &outVal, const std::string &aSourceId=std::string(""))
 
virtual int GetConnected () const
 
virtual bool GetCorrectlyConfigured () const
 
PlusStatus GetDataSource (const char *aSourceId, vtkPlusDataSource *&aSource)
 
PlusStatus GetDataSource (const std::string &aSourceId, vtkPlusDataSource *&aSource)
 
virtual double GetDesiredTimestamp ()
 
virtual std::string GetDeviceId () const
 
PlusStatus GetFieldDataSource (const char *aSourceId, vtkPlusDataSource *&aSource) const
 
PlusStatus GetFieldDataSource (const std::string &aSourceId, vtkPlusDataSource *&aSource) const
 
DataSourceContainerConstIterator GetFieldDataSourcessIteratorBegin () const
 
DataSourceContainerConstIterator GetFieldDataSourcessIteratorEnd () const
 
PlusStatus GetFirstActiveOutputVideoSource (vtkPlusDataSource *&aVideoSource)
 
PlusStatus GetFirstActiveTool (vtkPlusDataSource *&aTool) const
 
PlusStatus GetFirstOutputChannel (vtkPlusChannel *&aChannel)
 
PlusStatus GetFirstVideoSource (vtkPlusDataSource *&anImage)
 
virtual unsigned long GetFrameNumber () const
 
virtual double GetFrameTimeStamp () const
 
virtual PlusStatus GetImage (const std::string &requestedImageId, std::string &assignedImageId, const std::string &imageReferencFrameName, vtkImageData *imageData, vtkMatrix4x4 *ijkToReferenceTransform)
 
virtual PlusStatus GetImageMetaData (igsioCommon::ImageMetaDataList &imageMetaDataItems)
 
virtual US_IMAGE_TYPE GetImageType (vtkPlusChannel &aChannel)
 
PlusStatus GetInputDevices (std::vector< vtkPlusDevice * > &outDeviceList) const
 
PlusStatus GetInputDevicesRecursive (std::vector< vtkPlusDevice * > &outDeviceList) const
 
virtual PlusStatus GetInputFrameSize (vtkPlusChannel &aChannel, unsigned int &x, unsigned int &y, unsigned int &z) const
 
virtual PlusStatus GetInputFrameSize (vtkPlusChannel &aChannel, FrameSizeType &dim) const
 
double GetInternalUpdateRate () const
 
virtual double GetLocalTimeOffsetSec () const
 
double GetMissingInputGracePeriodSec () const
 
virtual int GetNumberOfFieldDataSources () const
 
virtual int GetNumberOfTools () const
 
virtual int GetNumberOfVideoSources () const
 
PlusStatus GetOutputChannelByName (vtkPlusChannel *&aChannel, const char *aChannelId)
 
PlusStatus GetOutputChannelByName (vtkPlusChannel *&aChannel, const std::string &aChannelId)
 
ChannelContainerConstIterator GetOutputChannelsEnd () const
 
ChannelContainerIterator GetOutputChannelsEnd ()
 
ChannelContainerConstIterator GetOutputChannelsStart () const
 
ChannelContainerIterator GetOutputChannelsStart ()
 
virtual PlusStatus GetOutputFrameSize (vtkPlusChannel &aChannel, unsigned int &x, unsigned int &y, unsigned int &z) const
 
virtual PlusStatus GetOutputFrameSize (vtkPlusChannel &aChannel, FrameSizeType &dim) const
 
virtual std::string GetParameter (const std::string &key) const
 
virtual PlusStatus GetParameter (const std::string &key, std::string &outValue) const
 
virtual igsioCommon::VTKScalarPixelType GetPixelType (vtkPlusChannel &aChannel)
 
virtual std::string GetSdkVersion ()
 
virtual double GetStartTime ()
 
virtual double GetTimestampClosestToDesired ()
 
PlusStatus GetTool (const char *aToolSourceId, vtkPlusDataSource *&aTool) const
 
PlusStatus GetTool (const std::string &aToolSourceId, vtkPlusDataSource *&aTool) const
 
PlusStatus GetToolByPortName (const char *aPortName, vtkPlusDataSource *&aSource)
 
PlusStatus GetToolByPortName (const std::string &aPortName, vtkPlusDataSource *&aSource)
 
DataSourceContainerConstIterator GetToolIteratorBegin () const
 
DataSourceContainerConstIterator GetToolIteratorEnd () const
 
std::string GetToolReferenceFrameName () const
 
virtual int GetUpdateWithDesiredTimestamp ()
 
PlusStatus GetVideoSource (const char *aSourceId, vtkPlusDataSource *&aVideoSource)
 
PlusStatus GetVideoSourceByIndex (const unsigned int index, vtkPlusDataSource *&aVideoSource)
 
DataSourceContainerConstIterator GetVideoSourceIteratorBegin () const
 
DataSourceContainerConstIterator GetVideoSourceIteratorEnd () const
 
std::vector< vtkPlusDataSource * > GetVideoSources () const
 
PlusStatus GetVideoSourcesByPortName (const char *aPortName, std::vector< vtkPlusDataSource * > &sources)
 
PlusStatus GetVideoSourcesByPortName (const std::string &aPortName, std::vector< vtkPlusDataSource * > &sources)
 
virtual bool IsConnected () const
 
virtual bool IsRecording () const
 
virtual bool IsResettable ()
 
virtual bool IsVirtual () const
 
virtual int OutputChannelCount () const
 
virtual PlusStatus Probe ()
 
virtual PlusStatus ReadConfiguration (vtkXMLDataElement *)
 
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual PlusStatus Reset ()
 
virtual PlusStatus SendText (const std::string &textToSend, std::string *textReceived=NULL)
 
PlusStatus SetAcquisitionRate (double aRate)
 
virtual PlusStatus SetBufferSize (vtkPlusChannel &aChannel, int FrameBufferSize, const std::string &aSourceId=std::string(""))
 
virtual void SetDataCollector (vtkPlusDataCollector *_arg)
 
virtual void SetDesiredTimestamp (double)
 
void SetDeviceId (const std::string &id)
 
void SetFieldDataSourcesBufferSize (int aBufferSize)
 
virtual PlusStatus SetImageType (vtkPlusChannel &aChannel, US_IMAGE_TYPE imageType)
 
virtual PlusStatus SetInputFrameSize (vtkPlusDataSource &aSource, unsigned int x, unsigned int y, unsigned int z)
 
virtual void SetLocalTimeOffsetSec (double aTimeOffsetSec)
 
virtual void SetMissingInputGracePeriodSec (double)
 
virtual PlusStatus SetParameter (const std::string &key, const std::string &value)
 
virtual PlusStatus SetPixelType (vtkPlusChannel &aChannel, igsioCommon::VTKScalarPixelType pixelType)
 
virtual void SetStartTime (double startTime)
 
void SetToolReferenceFrameName (const std::string &frameName)
 
void SetToolsBufferSize (int aBufferSize)
 
virtual void SetUpdateWithDesiredTimestamp (int)
 
virtual PlusStatus StartRecording ()
 
virtual PlusStatus StopRecording ()
 
virtual void UpdateWithDesiredTimestampOff ()
 
virtual void UpdateWithDesiredTimestampOn ()
 
virtual PlusStatus WriteConfiguration (vtkXMLDataElement *)
 
virtual PlusStatus WriteToolsToSequenceFile (const std::string &filename, bool useCompression=false)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPlusWin32VideoSource2New ()
 
static vtkPlusWin32VideoSource2SafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkPlusDevice
static PlusStatus GetToolReferenceFrameFromTrackedFrame (igsioTrackedFrame &aFrame, std::string &aToolReferenceFrameName)
 
static int IsTypeOf (const char *type)
 
static vtkPlusDeviceNew ()
 
static vtkPlusDeviceSafeDownCast (vtkObject *o)
 

Protected Member Functions

virtual PlusStatus InternalConnect ()
 
virtual PlusStatus InternalDisconnect ()
 
virtual PlusStatus InternalStartRecording ()
 
virtual PlusStatus InternalStopRecording ()
 
virtual PlusStatus InternalUpdate ()
 
void ReleaseSystemResources ()
 
virtual void SetWndClassName (const char *)
 
PlusStatus UpdateFrameBuffer ()
 
 vtkPlusWin32VideoSource2 ()
 
 ~vtkPlusWin32VideoSource2 ()
 
- Protected Member Functions inherited from vtkPlusDevice
virtual PlusStatus AddVideoItemToVideoSources (const std::vector< vtkPlusDataSource * > &videoSources, const igsioVideoFrame &frame, long frameNumber, double unfilteredTimestamp=UNDEFINED_TIMESTAMP, double filteredTimestamp=UNDEFINED_TIMESTAMP, const igsioFieldMapType *customFields=NULL)
 
virtual PlusStatus AddVideoItemToVideoSources (const std::vector< vtkPlusDataSource * > &videoSources, void *imageDataPtr, US_IMAGE_ORIENTATION usImageOrientation, const FrameSizeType &frameSizeInPx, igsioCommon::VTKScalarPixelType pixelType, unsigned int numberOfScalarComponents, US_IMAGE_TYPE imageType, int numberOfBytesToSkip, long frameNumber, double unfilteredTimestamp=UNDEFINED_TIMESTAMP, double filteredTimestamp=UNDEFINED_TIMESTAMP, const igsioFieldMapType *customFields=NULL)
 
PlusStatus EnsureUniqueDataSourceId (const std::string &aSourceId)
 
vtkXMLDataElement * FindInputChannelElement (vtkXMLDataElement *rootXMLElement, const char *aChannelId)
 
vtkXMLDataElement * FindOutputChannelElement (vtkXMLDataElement *rootXMLElement, const char *aChannelId)
 
vtkXMLDataElement * FindThisDeviceElement (vtkXMLDataElement *rootXMLElement)
 
virtual vtkPlusDataCollectorGetDataCollector ()
 
double GetRecordingStartTime () const
 
bool GetStartThreadForInternalUpdates () const
 
bool HasGracePeriodExpired ()
 
virtual void InternalWriteInputChannels (vtkXMLDataElement *rootXMLElement)
 
virtual void InternalWriteOutputChannels (vtkXMLDataElement *rootXMLElement)
 
virtual void SetCorrectlyConfigured (bool)
 
virtual void SetRecordingStartTime (double)
 
virtual void SetStartThreadForInternalUpdates (bool)
 
virtual PlusStatus ToolTimeStampedUpdate (const std::string &aToolSourceId, vtkMatrix4x4 *matrix, ToolStatus status, unsigned long frameNumber, double unfilteredtimestamp, const igsioFieldMapType *customFields=NULL)
 
virtual PlusStatus ToolTimeStampedUpdateWithoutFiltering (const std::string &aToolSourceId, vtkMatrix4x4 *matrix, ToolStatus status, double unfilteredtimestamp, double filteredtimestamp, const igsioFieldMapType *customFields=NULL)
 
 vtkPlusDevice ()
 
virtual ~vtkPlusDevice ()
 

Protected Attributes

int FrameIndex
 
vtkPlusWin32VideoSource2Internal * Internal
 
int Preview
 
igsioVideoFrame UncompressedVideoFrame
 
char * WndClassName
 
- Protected Attributes inherited from vtkPlusDevice
double AcquisitionRate
 
int Connected
 
bool CorrectlyConfigured
 
StreamBufferItemCurrentStreamBufferItem
 
vtkPlusDataCollectorDataCollector
 
double DesiredTimestamp
 
std::string DeviceId
 
DataSourceContainer Fields
 
unsigned long FrameNumber
 
double FrameTimeStamp
 
ChannelContainer InputChannels
 
double LocalTimeOffsetSec
 
double MissingInputGracePeriodSec
 
ChannelContainer OutputChannels
 
int OutputNeedsInitialization
 
std::map< std::string, std::string > Parameters
 
int Recording
 
double RecordingStartTime
 
std::set< std::string > ReportedUnknownTools
 
bool RequireImageOrientationInConfiguration
 
bool RequirePortNameInDeviceSetConfiguration
 
bool StartThreadForInternalUpdates
 
bool ThreadAlive
 
vtkMultiThreader * Threader
 
int ThreadId
 
double TimestampClosestToDesired
 
std::string ToolReferenceFrameName
 
DataSourceContainer Tools
 
int UpdateWithDesiredTimestamp
 
DataSourceContainer VideoSources
 

Additional Inherited Members

- Public Attributes inherited from vtkPlusDevice
double InternalUpdateRate
 
vtkIGSIORecursiveCriticalSection * UpdateMutex
 
vtkTimeStamp UpdateTime
 
- Static Public Attributes inherited from vtkPlusDevice
static const std::string BMODE_PORT_NAME = "B"
 
static const std::string PARAMETER_XML_ELEMENT_TAG = "Parameter"
 
static const std::string PARAMETERS_XML_ELEMENT_TAG = "Parameters"
 
static const std::string RFMODE_PORT_NAME = "Rf"
 
- Static Protected Member Functions inherited from vtkPlusDevice
static void * vtkDataCaptureThread (vtkMultiThreader::ThreadInfo *data)
 
- Static Protected Attributes inherited from vtkPlusDevice
static const int VIRTUAL_DEVICE_FRAME_RATE = 50
 

Detailed Description

Video-for-Windows video digitizer.

vtkPlusWin32VideoSource2 grabs frames or streaming video from a Video for Windows compatible device on the Win32 platform. vtkPlusWin32VideoSource2 is an updated version of vtkWin32VideoSource and uses vtkPlusDevice instead of vtkVideoSource.

Caveats: With some capture cards, if this class is leaked and ReleaseSystemResources is not called, you may have to reboot before you can capture again. vtkPlusDevice used to keep a global list and delete the video sources if your program leaked, due to exit crashes that was removed.

See also
vtkPlusDevice vtkMILVideoSource2 vtkWin32VideoSource

Definition at line 43 of file vtkPlusWin32VideoSource2.h.

Member Typedef Documentation

◆ Superclass

Definition at line 47 of file vtkPlusWin32VideoSource2.h.

Constructor & Destructor Documentation

◆ vtkPlusWin32VideoSource2()

vtkPlusWin32VideoSource2::vtkPlusWin32VideoSource2 ( )
protected

Constructor

Definition at line 113 of file vtkPlusWin32VideoSource2.cxx.

◆ ~vtkPlusWin32VideoSource2()

vtkPlusWin32VideoSource2::~vtkPlusWin32VideoSource2 ( )
protected

Destructor

Definition at line 125 of file vtkPlusWin32VideoSource2.cxx.

Member Function Documentation

◆ AddFrameToBuffer()

PlusStatus vtkPlusWin32VideoSource2::AddFrameToBuffer ( void *  lpVideoHeader)

Adds a frame to the frame buffer. Called whenever the driver notified a new frame acquisition. Public to allow calling from static function.

Definition at line 514 of file vtkPlusWin32VideoSource2.cxx.

◆ GetClassName()

virtual const char* vtkPlusWin32VideoSource2::GetClassName ( )
virtual

Reimplemented from vtkPlusDevice.

◆ GetPreview()

virtual int vtkPlusWin32VideoSource2::GetPreview ( )
virtual

Get state of preview (overlay) window

◆ InternalConnect()

PlusStatus vtkPlusWin32VideoSource2::InternalConnect ( )
protectedvirtual

Device-specific connect

Reimplemented from vtkPlusDevice.

Definition at line 215 of file vtkPlusWin32VideoSource2.cxx.

◆ InternalDisconnect()

PlusStatus vtkPlusWin32VideoSource2::InternalDisconnect ( )
protectedvirtual

Device-specific disconnect

Reimplemented from vtkPlusDevice.

Definition at line 447 of file vtkPlusWin32VideoSource2.cxx.

◆ InternalStartRecording()

PlusStatus vtkPlusWin32VideoSource2::InternalStartRecording ( )
protectedvirtual

Device-specific recording start

Reimplemented from vtkPlusDevice.

Definition at line 580 of file vtkPlusWin32VideoSource2.cxx.

◆ InternalStopRecording()

PlusStatus vtkPlusWin32VideoSource2::InternalStopRecording ( )
protectedvirtual

Device-specific recording stop

Reimplemented from vtkPlusDevice.

Definition at line 594 of file vtkPlusWin32VideoSource2.cxx.

◆ InternalUpdate()

PlusStatus vtkPlusWin32VideoSource2::InternalUpdate ( )
protectedvirtual

The internal function which actually grabs one frame. It just requests a single frame from the hardware and the object will be notified when it is ready.

Reimplemented from vtkPlusDevice.

Definition at line 568 of file vtkPlusWin32VideoSource2.cxx.

◆ IsA()

virtual int vtkPlusWin32VideoSource2::IsA ( const char *  type)
virtual

Reimplemented from vtkPlusDevice.

◆ IsTracker()

virtual bool vtkPlusWin32VideoSource2::IsTracker ( ) const
inlinevirtual

Is this device a tracker

Reimplemented from vtkPlusDevice.

Definition at line 80 of file vtkPlusWin32VideoSource2.h.

◆ IsTypeOf()

static int vtkPlusWin32VideoSource2::IsTypeOf ( const char *  type)
static

◆ New()

static vtkPlusWin32VideoSource2* vtkPlusWin32VideoSource2::New ( )
static

◆ NotifyConfigured()

PlusStatus vtkPlusWin32VideoSource2::NotifyConfigured ( )
virtual

Verify the device is correctly configured

Reimplemented from vtkPlusDevice.

Definition at line 809 of file vtkPlusWin32VideoSource2.cxx.

◆ OnParentWndDestroy()

void vtkPlusWin32VideoSource2::OnParentWndDestroy ( )

Callback function called on parent window destroyed. Public to allow calling from static function.

Definition at line 507 of file vtkPlusWin32VideoSource2.cxx.

◆ PreviewOff()

virtual void vtkPlusWin32VideoSource2::PreviewOff ( )
virtual

◆ PreviewOn()

virtual void vtkPlusWin32VideoSource2::PreviewOn ( )
virtual

◆ PrintSelf()

void vtkPlusWin32VideoSource2::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Reimplemented from vtkPlusDevice.

Definition at line 134 of file vtkPlusWin32VideoSource2.cxx.

◆ ReleaseSystemResources()

void vtkPlusWin32VideoSource2::ReleaseSystemResources ( )
protected

Definition at line 497 of file vtkPlusWin32VideoSource2.cxx.

◆ SafeDownCast()

static vtkPlusWin32VideoSource2* vtkPlusWin32VideoSource2::SafeDownCast ( vtkObject *  o)
static

◆ SetAcquisitionRate()

PlusStatus vtkPlusWin32VideoSource2::SetAcquisitionRate ( double  rate)
virtual

Request a particular frame rate (default 30 frames per second).

Definition at line 696 of file vtkPlusWin32VideoSource2.cxx.

◆ SetFrameSize()

PlusStatus vtkPlusWin32VideoSource2::SetFrameSize ( const FrameSizeType &  frameSize)
virtual

Request a particular frame size

Definition at line 668 of file vtkPlusWin32VideoSource2.cxx.

◆ SetOutputFormat()

PlusStatus vtkPlusWin32VideoSource2::SetOutputFormat ( int  format)
virtual

Request a particular output format (default: VTK_RGB).

Definition at line 725 of file vtkPlusWin32VideoSource2.cxx.

◆ SetPreview()

void vtkPlusWin32VideoSource2::SetPreview ( int  showPreview)

Turn on/off the preview (overlay) window.

Definition at line 468 of file vtkPlusWin32VideoSource2.cxx.

◆ SetWndClassName()

virtual void vtkPlusWin32VideoSource2::SetWndClassName ( const char *  )
protectedvirtual

Set the capture window class name

◆ UpdateFrameBuffer()

PlusStatus vtkPlusWin32VideoSource2::UpdateFrameBuffer ( )
protected

Update the buffer format to match the capture settings

Definition at line 781 of file vtkPlusWin32VideoSource2.cxx.

◆ VideoFormatDialog()

PlusStatus vtkPlusWin32VideoSource2::VideoFormatDialog ( )

Bring up a modal dialog box for video format selection.

Definition at line 605 of file vtkPlusWin32VideoSource2.cxx.

◆ VideoSourceDialog()

PlusStatus vtkPlusWin32VideoSource2::VideoSourceDialog ( )

Bring up a modal dialog box for video input selection.

Definition at line 637 of file vtkPlusWin32VideoSource2.cxx.

Member Data Documentation

◆ FrameIndex

int vtkPlusWin32VideoSource2::FrameIndex
protected

Definition at line 114 of file vtkPlusWin32VideoSource2.h.

◆ Internal

vtkPlusWin32VideoSource2Internal* vtkPlusWin32VideoSource2::Internal
protected

Definition at line 116 of file vtkPlusWin32VideoSource2.h.

◆ Preview

int vtkPlusWin32VideoSource2::Preview
protected

Definition at line 112 of file vtkPlusWin32VideoSource2.h.

◆ UncompressedVideoFrame

igsioVideoFrame vtkPlusWin32VideoSource2::UncompressedVideoFrame
protected

Definition at line 123 of file vtkPlusWin32VideoSource2.h.

◆ WndClassName

char* vtkPlusWin32VideoSource2::WndClassName
protected

Definition at line 109 of file vtkPlusWin32VideoSource2.h.


The documentation for this class was generated from the following files: