MCPcopy Create free account
hub / github.com/MITK/MITK / GetCESTFrequency

Method GetCESTFrequency

Modules/CEST/src/mitkCESTPropertyHelper.cpp:83–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83double mitk::GetCESTFrequency(const IPropertyProvider* provider)
84{
85 if (!provider)
86 {
87 mitkThrow() << "Cannot determine frequency. Passed property provider is invalid.";
88 }
89
90 double result = 0.0;
91
92 auto prop = provider->GetConstProperty(CEST_PROPERTY_NAME_FREQ().c_str());
93 if (prop.IsNotNull())
94 {
95 result = mitk::ConvertDICOMStrToValue<double>(prop->GetValueAsString()) * 0.000001;
96 }
97 else mitkThrow() << "Cannot determine frequency. Selected input has no property \"" << CEST_PROPERTY_NAME_FREQ() << "\"";
98
99 return result;
100}
101
102void mitk::SetCESTFrequencyMHz(IPropertyOwner* owner, double freqInMHz)
103{

Callers

nothing calls this directly

Calls 3

IsNotNullMethod · 0.80
GetConstPropertyMethod · 0.45
GetValueAsStringMethod · 0.45

Tested by

no test coverage detected