46 #define M_PI 3.14159265358979323846
53 mPatientModelService(patientModelService),
64 void ReconstructParams::onPatientChanged()
66 if (mParameters.empty())
70 QStringList presetList;
73 presetList = presets->getPresetList(
"US");
74 mPresetTFAdapter->setValueRange(presetList);
78 void ReconstructParams::createParameters()
80 if (!mParameters.empty())
86 "Algorithm to use for output volume orientation",
"MiddleFrame",
87 QString(
"PatientReference MiddleFrame").split(
" "),
90 this->add(mOrientationAdapter);
94 "Preset transfer function to apply to the reconstructed volume",
"US B-Mode", QStringList(),
97 this->add(mPresetTFAdapter);
100 "Speedup by reducing mask size",
"3",
101 QString(
"0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15").split(
" "),
104 this->add(mMaskReduce);
107 "Align the first of tracker and frame timestamps, ignoring lags.",
false,
110 this->add(mAlignTimestamps);
113 "Set an offset in the frame timestamps, in addition to the one used in acquisition", 0.0,
114 DoubleRange(-1000, 1000, 10), 0,
117 this->add(mTimeCalibration);
119 double maxVolumeSizeFactor = 1024*1024;
121 "Output Volume Size (Mb)", 32*maxVolumeSizeFactor,
122 DoubleRange(maxVolumeSizeFactor, maxVolumeSizeFactor*500, maxVolumeSizeFactor), 0,
124 mMaxVolumeSize->setInternal2Display(1.0/maxVolumeSizeFactor);
126 this->add(mMaxVolumeSize);
129 "Ultrasound angio data is used as input",
false,
132 this->add(mAngioAdapter);
135 "If angio requested, also create a B-mode reconstruction based on the same data set.",
true,
137 connect(mCreateBModeWhenAngio.get(), SIGNAL(valueWasSet()),
this, SIGNAL(
changedInputSettings()));
138 this->add(mCreateBModeWhenAngio);
141 QString(), QStringList(), mSettings.
getElement());
143 this->add(mAlgorithmAdapter);
145 this->onPatientChanged();
150 mParameters[param->getUid()] = param;
155 if (mParameters.empty())
156 this->createParameters();
157 if (mParameters.count(uid))
158 return mParameters[uid];
165 for (std::map<QString, PropertyPtr>::const_iterator iter=mParameters.begin(); iter!=mParameters.end(); ++iter)
166 retval << iter->first;
170 void ReconstructParams::transferFunctionChangedSlot()
173 if(mPresetTFAdapter->getValue() ==
"US Angio")
175 reportDebug(
"Reconstructing angio (Because of angio transfer function)");
176 mAngioAdapter->setValue(
true);
178 else if(mPresetTFAdapter->getValue() ==
"US B-Mode" && mAngioAdapter->getValue())
180 reportDebug(
"Not reconstructing angio (Because of B-Mode transfer function)");
181 mAngioAdapter->setValue(
false);
static BoolPropertyPtr initialize(const QString &uid, QString name, QString help, bool value, QDomNode root=QDomNode())
QStringList getParameterUids() const
boost::shared_ptr< class TransferFunctions3DPresets > PresetTransferFunctions3DPtr
ReconstructParams(PatientModelServicePtr patientModelService, XmlOptionFile settings)
QDomElement getElement()
return the current element
boost::shared_ptr< class Property > PropertyPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
void changedInputSettings()
Settings * settings()
Shortcut for accessing the settings instance.
static StringPropertyPtr initialize(const QString &uid, QString name, QString help, QString value, QStringList range, QDomNode root=QDomNode())
virtual ~ReconstructParams()
static DoublePropertyPtr initialize(const QString &uid, QString name, QString help, double value, DoubleRange range, int decimals, QDomNode root=QDomNode())
void save()
save entire document.
Helper class for xml files used to store ssc/cx data.
void reportDebug(QString msg)
PropertyPtr getParameter(QString uid)