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

Method GetCESTPulseDuration

Modules/CEST/src/mitkCESTPropertyHelper.cpp:110–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110double mitk::GetCESTPulseDuration(const IPropertyProvider* provider)
111{
112 if (!provider)
113 {
114 mitkThrow() << "Cannot determine pulse duration. Passed property provider is invalid.";
115 }
116
117 double result = 0.0;
118
119 auto prop = provider->GetConstProperty(CEST_PROPERTY_NAME_PULSEDURATION().c_str());
120 if (prop.IsNotNull())
121 {
122 result = mitk::ConvertDICOMStrToValue<double>(prop->GetValueAsString()) * 0.000001;
123 }
124 else mitkThrow() << "Cannot determine pulse duration. Selected input has no property \"" << CEST_PROPERTY_NAME_PULSEDURATION() << "\"";
125
126 return result;
127}
128
129double mitk::GetCESTDutyCycle(const IPropertyProvider* provider)
130{

Callers

nothing calls this directly

Calls 3

IsNotNullMethod · 0.80
GetConstPropertyMethod · 0.45
GetValueAsStringMethod · 0.45

Tested by

no test coverage detected