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

Method GetDoubleProperty

Modules/Core/src/DataManagement/mitkDataNode.cpp:302–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302bool mitk::DataNode::GetDoubleProperty(const char *propertyKey,
303 double &doubleValue,
304 const mitk::BaseRenderer *renderer) const
305{
306 mitk::DoubleProperty::Pointer doubleprop = dynamic_cast<mitk::DoubleProperty *>(GetProperty(propertyKey, renderer));
307 if (doubleprop.IsNull())
308 {
309 // try float instead
310 float floatValue = 0;
311 if (this->GetFloatProperty(propertyKey, floatValue, renderer))
312 {
313 doubleValue = floatValue;
314 return true;
315 }
316 return false;
317 }
318
319 doubleValue = doubleprop->GetValue();
320 return true;
321}
322
323bool mitk::DataNode::GetStringProperty(const char *propertyKey,
324 std::string &string,

Callers 6

ApplyVisualPropertiesMethod · 0.45
TestPropertyListMethod · 0.45
ApplyAllPropertiesMethod · 0.45
ApplyAllPropertiesMethod · 0.45
GetCornerOffsetFactorMethod · 0.45
GetFontFactorMethod · 0.45

Calls 4

GetFloatPropertyMethod · 0.95
GetPropertyFunction · 0.50
IsNullMethod · 0.45
GetValueMethod · 0.45

Tested by 1

TestPropertyListMethod · 0.36