| 127 | } |
| 128 | |
| 129 | double mitk::GetCESTDutyCycle(const IPropertyProvider* provider) |
| 130 | { |
| 131 | if (!provider) |
| 132 | { |
| 133 | mitkThrow() << "Cannot determine duty cycle. Passed property provider is invalid."; |
| 134 | } |
| 135 | |
| 136 | double result = 0.0; |
| 137 | |
| 138 | auto prop = provider->GetConstProperty(CEST_PROPERTY_NAME_DutyCycle().c_str()); |
| 139 | if (prop.IsNotNull()) |
| 140 | { |
| 141 | result = mitk::ConvertDICOMStrToValue<double>(prop->GetValueAsString()) * 0.01; |
| 142 | } |
| 143 | else mitkThrow() << "Cannot determine duty cycle. Selected input has no property \"" << CEST_PROPERTY_NAME_DutyCycle() << "\""; |
| 144 | |
| 145 | return result; |
| 146 | } |
nothing calls this directly
no test coverage detected