Medical Imaging Interaction Toolkit  2018.4.99-87d68d9f
Medical Imaging Interaction Toolkit
mitkUSControlInterfaceBMode.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
14 #include "mitkUSDevice.h"
15 
18 {
19  if (device.IsNull())
20  {
21  MITK_ERROR << "USDevice must not be null for USControlInterfaceBMode.";
22  mitkThrow() << "USDevice must not be null for USControlInterfaceBMode.";
23  }
24 }
25 
27 {
28 }
29 
31 {
32  m_Device->UpdateServiceProperty(
33  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_FREQUENCY,
34  this->GetScanningFrequency());
35 
36  m_Device->UpdateServiceProperty(
37  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_POWER,
38  this->GetScanningPower());
39 
40  m_Device->UpdateServiceProperty(
41  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_DEPTH,
42  this->GetScanningDepth());
43 
44  m_Device->UpdateServiceProperty(
45  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_GAIN,
46  this->GetScanningGain());
47 
48  m_Device->UpdateServiceProperty(
49  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_REJECTION,
50  this->GetScanningRejection());
51 
52  m_Device->UpdateServiceProperty(
53  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_DYNAMIC_RANGE,
54  this->GetScanningDynamicRange());
55 }
56 
58 {
59  this->OnSetScanningFrequency(frequency);
60  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_FREQUENCY, frequency);
61 }
62 
64 {
65  this->OnSetScanningPower(power);
66  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_POWER, power);
67 }
68 
70 {
71  this->OnSetScanningDepth(depth);
72  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_DEPTH, depth);
73 }
74 
76 {
77  this->OnSetScanningGain(gain);
78  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_GAIN, gain);
79 }
80 
82 {
83  this->OnSetScanningRejection(rejection);
84  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_REJECTION, rejection);
85 }
86 
88 {
89  this->OnSetScanningDynamicRange(dynamicRange);
90  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_DYNAMIC_RANGE, dynamicRange);
91 }
virtual double GetScanningDepth()=0
Superclass for all ultrasound device control interfaces. Defines an interface for activating and deac...
virtual double GetScanningPower()=0
virtual void OnSetScanningRejection(double rejection)=0
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningRejection. Implement this method to handle the actual setting of the value at the device api.
#define MITK_ERROR
Definition: mitkLogMacros.h:20
DataCollection - Class to facilitate loading/accessing structured data.
static mitk::USDevice::PropertyKeys GetPropertyKeys()
virtual double GetScanningDynamicRange()=0
virtual void OnSetScanningDepth(double depth)=0
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 GetScanningFrequency()=0
virtual void OnSetScanningPower(double power)=0
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningPower. Implement this method to handle the actual setting of the value at the device api.
#define mitkThrow()
virtual double GetScanningGain()=0
virtual void OnSetScanningFrequency(double frequency)=0
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningFrequency.
void Initialize()
Initializes the microservice properties with the current values from the device. This method must be ...
USControlInterfaceBMode(itk::SmartPointer< USDevice > device)
virtual void SetScanningDynamicRange(double dynamicRange)
virtual void OnSetScanningDynamicRange(double dynamicRange)=0
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 GetScanningRejection()=0
virtual void OnSetScanningGain(double gain)=0
Virtual method which is called inside mitk::USControlInterfaceBMode::SetScanningGain. Implement this method to handle the actual setting of the value at the device api.