You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

138 lines
3.7 KiB

#ifndef BMODESETTINGVIEWMODEL_H
#define BMODESETTINGVIEWMODEL_H
#include "viewModel/BaseViewModel.h"
#include "viewModel/bMode/setting/DataBModeSetting.h"
#include "viewModel/bMode/setting/dtoInternal/BModeSettingProbePropertes.h"
#include "viewModel/bMode/setting/dtoInternal/BModeSettingPresetValues.h"
#include "model/backendImageProcessor/type/EImageMode.h"
class BModeSettingViewModel : public BaseViewModel
{
Q_OBJECT
US_VIEW_MODEL(BModeSettingViewModel)
SINGLETON(BModeSettingViewModel)
private:
DataBModeSetting_t _data;
BModeSettingProbeProperties_t _prbProps;
BModeSettingPresetValues_t _presetValues;
EImageMode::eImageMode _imageMode;
QList<float> _depthList;
bool _freezed;
bool getPiValue();
double degree2Rad(int angle);
bool isProbeLinear();
void setCriFilterEnable();
void setFrequencyEnable();
bool canEnableCriFilter();
bool canEnableFrequency();
int getRejectTrueValue();
void setAngle(int diff);
bool getCriEnableStatus();
int getRoundedPreviousAngle(int diff);
void setProbeDependentParams();
void setFrequencyValues();
void setAngleVisibility();
void checkAngleValidity();
void setFocusNumberValidValues();
void setFocusPointsValidValues();
int getMaxFocusPoints(int focusLenght, int focusNumber, int focusStep);
void setFocusPointsValuesForHi();
void setFocusPointsValuesForFfc();
void setFocusPointsValues();
void setDepthValues();
QList<QString> getNoneHiFreqNames();
QList<QString> getHiFreqNames();
void applyPreset();
/**************************************************************************************************/
US_MULTI_BUTTON(sri, "SRI", (QList<QString>({""})), "", "", true, true, 0, false)
US_SPIN_BOX(persist, "Persist", (QList<QString>({""})), "", "", true, false, 1)
US_MULTI_BUTTON(frameFilter, "Frame Filter", (QList<QString>({""})), "", "",
true, true, 0, false)
US_SPIN_BOX(oti, "OTI", (QList<QString>({"Solid", "Normal", "Adipose", "Cystic"})),
"", "", true, true, 0)
US_MULTI_BUTTON(criFilter, "CRI Filter", (QList<QString>({"Low", "Mid", "High"})),
"", "", true, true, 0, false)
US_MULTI_BUTTON(lineFilter, "Line Filter", (QList<QString>({"Low", "High"})),
"", "", true, true, 0, false)
US_MULTI_BUTTON_CUSTOM_SETTER_BYPASS_ONLY(cri, "CRI", QList<QString>({""}),
"", "", true, true, 0, false)
US_SPIN_BOX(lineDensity, "Line Dens.", (QList<QString>({"Low", "Norm", "High"})),
"", "", true, true, 0)
US_SWITCH_BUTTON_CUSTOM_SETTER(ffc, "FFC", "", true, true, false)
US_SWITCH_BUTTON_CUSTOM_SETTER(hi, "HI", "", true, true, false)
US_SWITCH_BUTTON(virtualConvex, "Virtual Convex", "", true, true, false)
US_SWITCH_BUTTON_CUSTOM_SETTER(maxAngle, "Max Angle", "", true, true, false)
US_SPIN_BOX_CUSTOM_SETTER(frequency, "Frq", {""}, "", "", true, true, 0)
US_SPIN_BOX(ao, "AO", (QList<QString>({""})), "", "%", true, true, 0)
US_SPIN_BOX(enhance, "Enhance", (QList<QString>({"Off", "1", "2", "3", "4", "5"})),
"", "", true, true, 0)
US_SPIN_BOX(reject, "Reject", (QList<QString>({""})), "", "", true, true, 0)
US_SPIN_BOX(dynamicContrast, "Dy.Cnt.", (QList<QString>({""})), "", "", true, true, 0)
US_JOYSTICK_SIMPLE(angle, "Angle", true, true, 0)
US_PROPERTY(bool, pi, true)
US_INFO_BOX(depth, "Depth", (QList<QString>({""})), "", "cm", true, true, 0)
US_INFO_BOX(focusPoints, "Foc.Pnt.", (QList<QString>({""})),
"", "", true, true, 0)
US_INFO_BOX_CUSTOM_SETTER(focusNumber, "Foc.Num.", (QList<QString>({""})),
"", "", true, true, 0)
US_INFO_BOX(gainB, "Gain", (QList<QString>({""})), "", "dB", true, true, 0)
US_INFO_BOX_BOOL(hdZoom, "HD.Zoom", true, true, false)
public:
void freezeChanged(bool freeze);
};
#endif //BMODESETTINGVIEWMODEL_H