21 : m_Plugin(NULL), m_OutputImage(NULL), m_OutputImageMutex(NULL)
33 reinterpret_cast<IUnknown*
>(*ppv)->AddRef() ;
40 return InterlockedIncrement(&m_cRef) ;
46 if (InterlockedDecrement(&m_cRef) == 0)
56 int nInterimBufferLen,
72 unsigned int dim[]={(nOutX2 - nOutX1), (nOutY2 - nOutY1)};
74 m_OutputImage->Initialize(mitk::MakeScalarPixelType<BYTE>(), 2, dim);
90 m_Plugin->SetCallback(NULL,USPC_BUFFER_INTERIM_OUTPUT);
111 MITK_INFO(
"IUsgfwScanConverterPluginCB")(
"ScanConverterPlugin")
112 <<
"NULL plugin set to the scan converter. The callback for the previous plugin is removed now.";
117 Usgfw2Lib::IUsgScanConverterPlugin* tmp_plugin;
118 hr = plugin->QueryInterface(__uuidof(Usgfw2Lib::IUsgScanConverterPlugin), (
void**)&tmp_plugin);
122 MITK_WARN(
"IUsgfwScanConverterPluginCB")(
"ScanConverterPlugin")
123 <<
"Could not query com interface for IUsgScanConverterPlugin (" << hr <<
").";
129 hr = tmp_plugin->get_ScanConverter((IUnknown**)&
m_Plugin);
133 MITK_WARN(
"IUsgfwScanConverterPluginCB")(
"ScanConverterPlugin")
134 <<
"Could not get ScanConverter from plugin (" << hr <<
").";
143 hr =
m_Plugin->SetCallback(
this,USPC_BUFFER_INTERIM_OUTPUT);
147 MITK_WARN(
"IUsgfwScanConverterPluginCB")(
"ScanConverterPlugin")
148 <<
"Could not set callback for plugin (" << hr <<
").";
itk::SmartPointer< Self > Pointer
IUsgfwScanConverterPlugin * m_Plugin
STDMETHOD() SetScanConverterPlugin(IDispatch *plugin)
itk::FastMutexLock::Pointer m_OutputImageMutex
USTelemedScanConverterPlugin()
virtual ULONG __stdcall AddRef()
STDMETHOD() InterimOutBufferCB(PBYTE pBufferInterim, int nInterimBufferLen, PBYTE pBufferOut, int nOutBufferLen, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
virtual HRESULT __stdcall QueryInterface(const IID &iid, void **ppv)
~USTelemedScanConverterPlugin()
mitk::Image::Pointer m_OutputImage
void SetOutputImage(mitk::Image::Pointer outputImage, itk::FastMutexLock::Pointer outputImageMutex=0)
virtual ULONG __stdcall Release()