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

Method GetNamedDerivedNode

Modules/Core/src/DataManagement/mitkDataStorage.cpp:116–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116mitk::DataNode *mitk::DataStorage::GetNamedDerivedNode(const char *name,
117 const DataNode *sourceNode,
118 bool onlyDirectDerivations) const
119{
120 if (name == nullptr)
121 return nullptr;
122
123 StringProperty::Pointer s(StringProperty::New(name));
124 NodePredicateProperty::Pointer p = NodePredicateProperty::New("name", s);
125 DataStorage::SetOfObjects::ConstPointer rs = this->GetDerivations(sourceNode, p, onlyDirectDerivations);
126 if (rs->Size() >= 1)
127 return rs->GetElement(0);
128 else
129 return nullptr;
130}
131
132std::string mitk::DataStorage::GetUniqueName(const std::string& baseName, const DataNode* sourceNode, bool onlyDirectDerivations) const
133{

Callers 4

GetUniqueNameMethod · 0.95
TestDataStorageFunction · 0.80
GetNamedDerivedObjectFunction · 0.80

Calls 4

GetDerivationsMethod · 0.80
NewFunction · 0.50
SizeMethod · 0.45
GetElementMethod · 0.45

Tested by 1

TestDataStorageFunction · 0.64