21 #define TELEMED_FREQUENCY_FACTOR 1000000
25 m_UsgDataView(0), m_PowerControl(0), m_FrequencyControl(0),
26 m_DepthControl(0), m_GainControl(0), m_RejectionControl(0),
27 m_DynamicRangeControl(0),
28 m_Active(false), m_PowerSteps(new double[3]),
29 m_GainSteps(new double[3]), m_RejectionSteps(new double[3]),
30 m_DynamicRangeSteps(new double[3])
36 this->ReleaseControls();
38 delete[] m_PowerSteps;
40 delete[] m_RejectionSteps;
41 delete[] m_DynamicRangeSteps;
46 m_UsgDataView = usgDataView;
51 this->ReleaseControls();
52 this->CreateControls();
59 HRESULT hr = m_UsgDataView->put_ScanState(Usgfw2Lib::SCAN_STATE_STOP);
60 if (FAILED(hr)) {
mitkThrow() <<
"Could not stop scanning (" << hr <<
")."; }
63 hr = m_UsgDataView->put_ScanMode(Usgfw2Lib::SCAN_MODE_B);
64 if (FAILED(hr)) {
mitkThrow() <<
"Could not set scan mode b (" << hr <<
")."; }
66 hr = m_UsgDataView->put_ScanState(Usgfw2Lib::SCAN_STATE_RUN);
67 if (FAILED(hr)) {
mitkThrow() <<
"Could not start scanning (" << hr <<
")."; }
69 this->CreateControls();
75 this->ReleaseControls();
86 HRESULT hr = m_UsgDataView->get_ScanMode(&scanMode);
87 if (FAILED(hr)) {
mitkThrow() <<
"Could not get scan mode (" << hr <<
")."; }
89 return m_Active && scanMode == Usgfw2Lib::SCAN_MODE_B;
124 return m_PowerSteps[0];
129 return m_PowerSteps[1];
134 return m_PowerSteps[2];
164 return m_GainSteps[0];
169 return m_GainSteps[1];
174 return m_GainSteps[2];
189 return m_RejectionSteps[0];
194 return m_RejectionSteps[1];
199 return m_RejectionSteps[2];
214 return m_DynamicRangeSteps[0];
219 return m_DynamicRangeSteps[1];
224 return m_DynamicRangeSteps[2];
230 CREATE_TelemedControl(m_FrequencyControl, m_UsgDataView, Usgfw2Lib::IID_IUsgProbeFrequency2, Usgfw2Lib::IUsgProbeFrequency2, Usgfw2Lib::SCAN_MODE_B);
233 CREATE_TelemedControl(m_PowerControl, m_UsgDataView, Usgfw2Lib::IID_IUsgPower, Usgfw2Lib::IUsgPower, Usgfw2Lib::SCAN_MODE_B);
237 CREATE_TelemedControl(m_DepthControl, m_UsgDataView, Usgfw2Lib::IID_IUsgDepth, Usgfw2Lib::IUsgDepth, Usgfw2Lib::SCAN_MODE_B);
240 CREATE_TelemedControl(m_GainControl, m_UsgDataView, Usgfw2Lib::IID_IUsgGain, Usgfw2Lib::IUsgGain, Usgfw2Lib::SCAN_MODE_B);
244 CREATE_TelemedControl(m_RejectionControl, m_UsgDataView, Usgfw2Lib::IID_IUsgRejection2, Usgfw2Lib::IUsgRejection2, Usgfw2Lib::SCAN_MODE_B);
248 CREATE_TelemedControl(m_DynamicRangeControl, m_UsgDataView, Usgfw2Lib::IID_IUsgDynamicRange, Usgfw2Lib::IUsgDynamicRange, Usgfw2Lib::SCAN_MODE_B);
double GetScanningFrequencyAPI()
virtual double GetScanningGainTick()
virtual void OnSetScanningGain(double)
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningGain. Implement this method to handle the actual setting of the value at the device api.
USTelemedBModeControls(itk::SmartPointer< USTelemedDevice > device)
virtual double GetScanningPower()
virtual void OnSetScanningPower(double power)
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningPower. Implement this method to handle the actual setting of the value at the device api.
virtual ~USTelemedBModeControls()
virtual std::vector< double > GetScanningFrequencyValues()
virtual double GetScanningRejectionMax()
virtual double GetScanningFrequency()
void ReinitializeControls()
DataCollection - Class to facilitate loading/accessing structured data.
virtual void SetIsActive(bool)
virtual void OnSetScanningRejection(double)
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningRejection. Implement this method to handle the actual setting of the value at the device api.
virtual double GetScanningGainMax()
virtual void OnSetScanningDynamicRange(double)
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningDynamicRange. Implement this method to handle the actual setting of the value at the device api.
virtual double GetScanningDepth()
virtual double GetScanningDynamicRangeMin()
virtual bool GetIsActive()
virtual double GetScanningDynamicRange()
virtual double GetScanningPowerMin()
virtual double GetScanningRejectionTick()
virtual void OnSetScanningFrequency(double frequency)
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningFrequency.
Interface defining methods for scanning mode b of ultrasound devices. It consists of methods for scan...
virtual std::vector< double > GetScanningDepthValues()
virtual double GetScanningGain()
virtual double GetScanningDynamicRangeTick()
virtual double GetScanningDynamicRangeMax()
void SetUsgDataView(Usgfw2Lib::IUsgDataView *)
Setter for the IUsgDataView necesary for communicating with the Telemed API. This method is just for ...
virtual void OnSetScanningDepth(double)
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningDepth. Implement this method to handle the actual setting of the value at the device api.
virtual double GetScanningRejection()
virtual double GetScanningPowerTick()
#define TELEMED_FREQUENCY_FACTOR
virtual double GetScanningRejectionMin()
virtual double GetScanningGainMin()
virtual double GetScanningPowerMax()