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

Method GetSuggestionPreferences

Modules/Multilabel/src/mitkLabelSuggestionHelper.cpp:335–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333 }
334
335 LabelSuggestionHelper::Preferences LabelSuggestionHelper::GetSuggestionPreferences()
336 {
337 auto prefService = mitk::CoreServices::GetPreferencesService();
338
339 Preferences prefs;
340
341 if (nullptr != prefService)
342 {
343 auto systemPref = prefService->GetSystemPreferences();
344 if (nullptr != systemPref)
345 {
346 auto* nodePrefs = systemPref->Node("/org.mitk.views.segmentation");
347
348 prefs.externalLabelSuggestionFile = nodePrefs->Get("external label suggestions", prefs.externalLabelSuggestionFile);
349 prefs.standardLabelSuggestionResource = nodePrefs->Get("standard label suggestions", prefs.standardLabelSuggestionResource);
350 prefs.replaceStandardSuggestions = nodePrefs->GetBool("replace standard suggestions", prefs.replaceStandardSuggestions);
351 prefs.enforceSuggestions = nodePrefs->GetBool("enforce suggestions", prefs.enforceSuggestions);
352 prefs.suggestionOnce = nodePrefs->GetBool("suggest once", prefs.suggestionOnce);
353 }
354 }
355
356 return prefs;
357 }
358
359
360} // namespace mitk

Callers

nothing calls this directly

Calls 4

GetBoolMethod · 0.80
GetSystemPreferencesMethod · 0.45
NodeMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected