From ede4bde17381eccd3641cd3e27470213f442ab03 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Wed, 19 Dec 2018 15:52:35 +0100 Subject: [PATCH] Add the use of user parameters in vv_settings For now, just the interpolation is taken into account But now, the user car save it's own settings modifying the vv_settings file --- vv/vvUtils.cxx | 23 +++++++++++++++++++++++ vv/vvUtils.h | 6 ++++++ 2 files changed, 29 insertions(+) diff --git a/vv/vvUtils.cxx b/vv/vvUtils.cxx index b787c9f..0c95873 100644 --- a/vv/vvUtils.cxx +++ b/vv/vvUtils.cxx @@ -95,6 +95,29 @@ int getDicomClientPort() return result; } +// get interpolation option for vv +int getInterpolationFavoriteStatus() +{ + int result; + QSettings settings(getVVSettingsPath(), getSettingsOptionFormat()); + settings.beginGroup(QString::fromStdString("VVSETTINGS")); + result = settings.value("interpolation").toString().toInt(); + settings.endGroup(); + return result; +} + +// set VV-settings at first use +void setVVSettings() +{ + QSettings settings(getVVSettingsPath(), getSettingsOptionFormat()); + if (! settings.childGroups().contains("VVSETTINGS")) + { + settings.beginGroup(QString::fromStdString("VVSETTINGS")); + settings.setValue("interpolation",QString::number(1)); + settings.endGroup(); + } +} + /// Add a new Dicom Server void AddDicomServer(std::string nickname, std::string aetitle, std::string adress, std::string port) { diff --git a/vv/vvUtils.h b/vv/vvUtils.h index 9a80462..83d857b 100644 --- a/vv/vvUtils.h +++ b/vv/vvUtils.h @@ -51,6 +51,12 @@ std::string getDicomClientAETitle(); // get VV-PORT-SCU for c-move parameters. int getDicomClientPort(); +// get interpolation option for vv +int getInterpolationFavoriteStatus(); + +// set VV-settings at first use +void setVVSettings(); + // get the directory where the dicom files will be stored during c-move action. std::string getCMoveDirectory(); -- 2.47.1