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

Function to_json

Modules/Core/src/DataManagement/mitkLevelWindow.cpp:535–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533namespace mitk
534{
535 void to_json(nlohmann::json& j, const LevelWindow& lw)
536 {
537 j = nlohmann::json{
538 {"Fixed", lw.IsFixed()},
539 {"IsFloatingImage", lw.IsFloatingValues()},
540 {"CurrentSettings", {
541 {"Level", lw.GetLevel()},
542 {"Window", lw.GetWindow()}}},
543 {"DefaultSettings", {
544 {"Level", lw.GetDefaultLevel()},
545 {"Window", lw.GetDefaultWindow()}}},
546 {"CurrentRange", {
547 {"Min", lw.GetRangeMin()},
548 {"Max", lw.GetRangeMax()}}}};
549 }
550
551 void from_json(const nlohmann::json& j, LevelWindow& lw)
552 {

Callers

nothing calls this directly

Calls 8

IsFloatingValuesMethod · 0.80
GetLevelMethod · 0.80
GetDefaultLevelMethod · 0.80
GetDefaultWindowMethod · 0.80
IsFixedMethod · 0.45
GetWindowMethod · 0.45
GetRangeMinMethod · 0.45
GetRangeMaxMethod · 0.45

Tested by

no test coverage detected