Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
18 #include "mitkUSDevice.h"
19 
22 {
23  if (device.IsNull())
24  {
25  MITK_ERROR << "USDevice must not be null for USControlInterfaceBMode.";
26  mitkThrow() << "USDevice must not be null for USControlInterfaceBMode.";
27  }
28 }
29 
31 {
32 }
33 
35 {
36  m_Device->UpdateServiceProperty(
37  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_FREQUENCY,
38  this->GetScanningFrequency());
39 
40  m_Device->UpdateServiceProperty(
41  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_POWER,
42  this->GetScanningPower());
43 
44  m_Device->UpdateServiceProperty(
45  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_DEPTH,
46  this->GetScanningDepth());
47 
48  m_Device->UpdateServiceProperty(
49  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_GAIN,
50  this->GetScanningGain());
51 
52  m_Device->UpdateServiceProperty(
53  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_REJECTION,
54  this->GetScanningRejection());
55 
56  m_Device->UpdateServiceProperty(
57  mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_DYNAMIC_RANGE,
58  this->GetScanningDynamicRange());
59 }
60 
62 {
63  this->OnSetScanningFrequency(frequency);
64  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_FREQUENCY, frequency);
65 }
66 
68 {
69  this->OnSetScanningPower(power);
70  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_POWER, power);
71 }
72 
74 {
75  this->OnSetScanningDepth(depth);
76  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_DEPTH, depth);
77 }
78 
80 {
81  this->OnSetScanningGain(gain);
82  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_GAIN, gain);
83 }
84 
86 {
87  this->OnSetScanningRejection(rejection);
88  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_REJECTION, rejection);
89 }
90 
92 {
93  this->OnSetScanningDynamicRange(dynamicRange);
94  m_Device->UpdateServiceProperty(mitk::USDevice::GetPropertyKeys().US_PROPKEY_BMODE_DYNAMIC_RANGE, dynamicRange);
95 }
Superclass for all ultrasound device control interfaces. Defines an interface for activating and deac...
#define MITK_ERROR
Definition: mitkLogMacros.h:24
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkThrow()
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)