MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkUSTelemedScanConverterPlugin.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef mitkUSTelemedScanConverterPlugin_h
14#define mitkUSTelemedScanConverterPlugin_h
15
16#include <initguid.h>
17#include <strmif.h>
18#include <usgfw2.h>
19#include <usgfw.h>
20#include <usgscanb.h>
21#include <mutex>
22
24#include "mitkImage.h"
25
26
27
41class USTelemedScanConverterPlugin : public IUsgfwScanConverterPluginCB
42
43{
44public:
47
48 // internal functions for Telemed API
49 virtual HRESULT __stdcall QueryInterface(const IID& iid,void** ppv);
50 virtual ULONG __stdcall AddRef();
51 virtual ULONG __stdcall Release();
52
61 void SetOutputImage(mitk::Image::Pointer outputImage, std::mutex* outputImageMutex);
62
63 // receives pointers to input and output media samples
64 STDMETHOD(SampleCB) (
65 IMediaSample *pSampleIn,
66 IMediaSample *pSampleOut,
67 int nOutX1,
68 int nOutY1,
69 int nOutX2,
70 int nOutY2
71 ) {return S_OK;}
72
73 // receives pointers to input and output sample buffers
74 STDMETHOD(BufferCB) (
75 PBYTE pBufferIn,
76 int nInBufferLen,
77 PBYTE pBufferOut,
78 int nOutBufferLen,
79 int nOutX1,
80 int nOutY1,
81 int nOutX2,
82 int nOutY2
83 ) {return S_OK;}
84
85 // receives pointers to input and intermediate sample buffers
86 STDMETHOD(InInterimBufferCB) (
87 PBYTE pBufferIn,
88 int nInBufferLen,
89 PBYTE pBufferInterim,
90 int nInterimBufferLen,
91 int nOutX1,
92 int nOutY1,
93 int nOutX2,
94 int nOutY2
95 ) {return S_OK;}
96
97 // receves pointers to input media sample and intermediatesample buffer
98 STDMETHOD(InInterimSampleCB) (
99 IMediaSample *pSampleIn,
100 PBYTE pBufferInterim,
101 int nInterimBufferLen,
102 int nOutX1,
103 int nOutY1,
104 int nOutX2,
105 int nOutY2
106 ) {return S_OK;}
107
108 // receives pointers to output and intermediate sample buffers
109 STDMETHOD(InterimOutBufferCB) (
110 PBYTE pBufferInterim,
111 int nInterimBufferLen,
112 PBYTE pBufferOut,
113 int nOutBufferLen,
114 int nOutX1,
115 int nOutY1,
116 int nOutX2,
117 int nOutY2
118 );
119
120 // receives pointers to output media sample and intermediate sample buffer
122 PBYTE pBufferInterim,
123 int nInterimBufferLen,
124 IMediaSample *pSampleIn,
125 int nOutX1,
126 int nOutY1,
127 int nOutX2,
128 int nOutY2
129 ) {return S_OK;}
130
131 // receives conversion parameter change pin index
132 // if parameter is negative parameter was changed by some filter interface
133 STDMETHOD(ParameterCB) (
134 int nPin
135 ) { return S_OK; }
136
137 STDMETHOD(SetScanConverterPlugin)(IDispatch* plugin);
138 //STDMETHOD(getSource)(LONG* plugin);
139
140protected:
144 void ReleasePlugin( );
145
149 IUsgfwScanConverterPlugin* m_Plugin;
150
155 mitk::Image::Pointer m_OutputImage;
156
162
163private:
164 long m_cRef ;
165};
166
167#endif
Telemed API plugin for getting images from scan lines. Implements a COM interface whereat only the fu...
STDMETHOD SampleCB(IMediaSample *pSampleIn, IMediaSample *pSampleOut, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
virtual HRESULT __stdcall QueryInterface(const IID &iid, void **ppv)
STDMETHOD InterimOutSampleCB(PBYTE pBufferInterim, int nInterimBufferLen, IMediaSample *pSampleIn, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
STDMETHOD SetScanConverterPlugin(IDispatch *plugin)
STDMETHOD InInterimSampleCB(IMediaSample *pSampleIn, PBYTE pBufferInterim, int nInterimBufferLen, 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 InterimOutBufferCB(PBYTE pBufferInterim, int nInterimBufferLen, PBYTE pBufferOut, int nOutBufferLen, int nOutX1, int nOutY1, int nOutX2, int nOutY2)
void SetOutputImage(mitk::Image::Pointer outputImage, std::mutex *outputImageMutex)
STDMETHOD InInterimBufferCB(PBYTE pBufferIn, int nInBufferLen, PBYTE pBufferInterim, int nInterimBufferLen, int nOutX1, int nOutY1, int nOutX2, int nOutY2)