Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
USTelemedScanConverterPlugin Class Reference

Telemed API plugin for getting images from scan lines. Implements a COM interface whereat only the function InterimOutBufferCB is used for copying given image buffer into a mitk::Image. More...

#include <mitkUSTelemedScanConverterPlugin.h>

Inheritance diagram for USTelemedScanConverterPlugin:
Collaboration diagram for USTelemedScanConverterPlugin:

Public Member Functions

 USTelemedScanConverterPlugin ()
 
 ~USTelemedScanConverterPlugin ()
 
virtual HRESULT __stdcall QueryInterface (const IID &iid, void **ppv)
 
virtual ULONG __stdcall AddRef ()
 
virtual ULONG __stdcall Release ()
 
void SetOutputImage (mitk::Image::Pointer outputImage, std::mutex *outputImageMutex)
 
STDMETHOD() SampleCB (IMediaSample *pSampleIn, IMediaSample *pSampleOut, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
 
STDMETHOD() BufferCB (PBYTE pBufferIn, int nInBufferLen, PBYTE pBufferOut, int nOutBufferLen, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
 
STDMETHOD() InInterimBufferCB (PBYTE pBufferIn, int nInBufferLen, PBYTE pBufferInterim, int nInterimBufferLen, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
 
STDMETHOD() InInterimSampleCB (IMediaSample *pSampleIn, PBYTE pBufferInterim, int nInterimBufferLen, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
 
STDMETHOD() InterimOutBufferCB (PBYTE pBufferInterim, int nInterimBufferLen, PBYTE pBufferOut, int nOutBufferLen, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
 
STDMETHOD() InterimOutSampleCB (PBYTE pBufferInterim, int nInterimBufferLen, IMediaSample *pSampleIn, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
 
STDMETHOD() ParameterCB (int nPin)
 
STDMETHOD() SetScanConverterPlugin (IDispatch *plugin)
 

Protected Member Functions

void ReleasePlugin ()
 

Protected Attributes

IUsgfwScanConverterPlugin * m_Plugin
 
mitk::Image::Pointer m_OutputImage
 
std::mutex * m_OutputImageMutex
 

Detailed Description

Telemed API plugin for getting images from scan lines. Implements a COM interface whereat only the function InterimOutBufferCB is used for copying given image buffer into a mitk::Image.

A pointer to this mitk::Image must be set by calling mitk::USTelemedScanConverterPlugin::SetOutputImage() first. The image content is then updated every time the Telemed API calls the implemented callback function of this class.

For more infomration about the implemented COM interface refer to the Telemed API documentation.

Definition at line 41 of file mitkUSTelemedScanConverterPlugin.h.

Constructor & Destructor Documentation

◆ USTelemedScanConverterPlugin()

USTelemedScanConverterPlugin::USTelemedScanConverterPlugin ( )

◆ ~USTelemedScanConverterPlugin()

USTelemedScanConverterPlugin::~USTelemedScanConverterPlugin ( )

Member Function Documentation

◆ AddRef()

virtual ULONG __stdcall USTelemedScanConverterPlugin::AddRef ( )
virtual

◆ BufferCB()

STDMETHOD() USTelemedScanConverterPlugin::BufferCB ( PBYTE  pBufferIn,
int  nInBufferLen,
PBYTE  pBufferOut,
int  nOutBufferLen,
int  nOutX1,
int  nOutY1,
int  nOutX2,
int  nOutY2 
)
inline

Definition at line 74 of file mitkUSTelemedScanConverterPlugin.h.

◆ InInterimBufferCB()

STDMETHOD() USTelemedScanConverterPlugin::InInterimBufferCB ( PBYTE  pBufferIn,
int  nInBufferLen,
PBYTE  pBufferInterim,
int  nInterimBufferLen,
int  nOutX1,
int  nOutY1,
int  nOutX2,
int  nOutY2 
)
inline

Definition at line 86 of file mitkUSTelemedScanConverterPlugin.h.

◆ InInterimSampleCB()

STDMETHOD() USTelemedScanConverterPlugin::InInterimSampleCB ( IMediaSample *  pSampleIn,
PBYTE  pBufferInterim,
int  nInterimBufferLen,
int  nOutX1,
int  nOutY1,
int  nOutX2,
int  nOutY2 
)
inline

Definition at line 98 of file mitkUSTelemedScanConverterPlugin.h.

◆ InterimOutBufferCB()

STDMETHOD() USTelemedScanConverterPlugin::InterimOutBufferCB ( PBYTE  pBufferInterim,
int  nInterimBufferLen,
PBYTE  pBufferOut,
int  nOutBufferLen,
int  nOutX1,
int  nOutY1,
int  nOutX2,
int  nOutY2 
)

◆ InterimOutSampleCB()

STDMETHOD() USTelemedScanConverterPlugin::InterimOutSampleCB ( PBYTE  pBufferInterim,
int  nInterimBufferLen,
IMediaSample *  pSampleIn,
int  nOutX1,
int  nOutY1,
int  nOutX2,
int  nOutY2 
)
inline

Definition at line 121 of file mitkUSTelemedScanConverterPlugin.h.

◆ ParameterCB()

STDMETHOD() USTelemedScanConverterPlugin::ParameterCB ( int  nPin)
inline

Definition at line 133 of file mitkUSTelemedScanConverterPlugin.h.

◆ QueryInterface()

virtual HRESULT __stdcall USTelemedScanConverterPlugin::QueryInterface ( const IID &  iid,
void **  ppv 
)
virtual

◆ Release()

virtual ULONG __stdcall USTelemedScanConverterPlugin::Release ( )
virtual

◆ ReleasePlugin()

void USTelemedScanConverterPlugin::ReleasePlugin ( )
protected

Remove Telemed API callback and release and delete m_Plugin attribute.

◆ SampleCB()

STDMETHOD() USTelemedScanConverterPlugin::SampleCB ( IMediaSample *  pSampleIn,
IMediaSample *  pSampleOut,
int  nOutX1,
int  nOutY1,
int  nOutX2,
int  nOutY2 
)
inline

Definition at line 64 of file mitkUSTelemedScanConverterPlugin.h.

◆ SetOutputImage()

void USTelemedScanConverterPlugin::SetOutputImage ( mitk::Image::Pointer  outputImage,
std::mutex *  outputImageMutex 
)

Setter for a pointer to a mitk::Image in which the current image buffer from the Telemed API will be stored at every API callback. This function must be called before image data can be got from this class. A pointer to a mutex can be set in addition. This mutex will be locked on every writing to the given image.

◆ SetScanConverterPlugin()

STDMETHOD() USTelemedScanConverterPlugin::SetScanConverterPlugin ( IDispatch *  plugin)

Member Data Documentation

◆ m_OutputImage

mitk::Image::Pointer USTelemedScanConverterPlugin::m_OutputImage
protected

Pointer to mitk::Image in which the current image buffer from the Telemed API will be stored at every API callback.

Definition at line 155 of file mitkUSTelemedScanConverterPlugin.h.

◆ m_OutputImageMutex

std::mutex* USTelemedScanConverterPlugin::m_OutputImageMutex
protected

Mutex for the output image. Has to be set together with the output image via SetOutputImage().

Definition at line 161 of file mitkUSTelemedScanConverterPlugin.h.

◆ m_Plugin

IUsgfwScanConverterPlugin* USTelemedScanConverterPlugin::m_Plugin
protected

Telemed API object for handling callbacks on new image data.

Definition at line 149 of file mitkUSTelemedScanConverterPlugin.h.


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