25 #define M_PI 3.14159265358979323846 32 mPatientModelService(patientModelService),
43 void ReconstructParams::onPatientChanged()
45 if (mParameters.empty())
49 QStringList presetList;
52 presetList = presets->getPresetList(
"US");
53 mPresetTFAdapter->setValueRange(presetList);
57 void ReconstructParams::createParameters()
59 if (!mParameters.empty())
65 "Algorithm to use for output volume orientation",
"MiddleFrame",
66 QString(
"PatientReference MiddleFrame").split(
" "),
69 this->add(mOrientationAdapter);
73 "Preset transfer function to apply to the reconstructed volume",
"US B-Mode", QStringList(),
76 this->add(mPresetTFAdapter);
79 "Speedup by reducing mask size",
"3",
80 QString(
"0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15").split(
" "),
83 this->add(mMaskReduce);
86 "Strength of position data prefiltering - 0 means off",
"2",
87 QString(
"0 1 2 3 4 5 6 7").split(
" "),
90 this->add(mPosFilterStrength);
93 "Align the first of tracker and frame timestamps, ignoring lags.",
false,
96 this->add(mAlignTimestamps);
99 "If 'on', tracking positions that deviate greatly from neighbours will be replaced with an interpolated value",
false,
102 this->add(mPositionThinning);
105 "Set an offset in the frame timestamps, in addition to the one used in acquisition", 0.0,
109 this->add(mTimeCalibration);
111 double maxVolumeSizeFactor = 1024*1024;
113 "Output Volume Size (Mb)", 32*maxVolumeSizeFactor,
114 DoubleRange(maxVolumeSizeFactor, maxVolumeSizeFactor*500, maxVolumeSizeFactor), 0,
116 mMaxVolumeSize->setInternal2Display(1.0/maxVolumeSizeFactor);
118 this->add(mMaxVolumeSize);
121 "Ultrasound angio data is used as input",
false,
124 this->add(mAngioAdapter);
127 "If angio requested, also create a B-mode reconstruction based on the same data set.",
true,
129 connect(mCreateBModeWhenAngio.get(), SIGNAL(valueWasSet()),
this, SIGNAL(
changedInputSettings()));
130 this->add(mCreateBModeWhenAngio);
133 QString(), QStringList(), mSettings.
getElement());
135 this->add(mAlgorithmAdapter);
137 this->onPatientChanged();
142 mParameters[param->getUid()] = param;
147 if (mParameters.empty())
148 this->createParameters();
149 if (mParameters.count(uid))
150 return mParameters[uid];
157 for (std::map<QString, PropertyPtr>::const_iterator iter=mParameters.begin(); iter!=mParameters.end(); ++iter)
158 retval << iter->first;
162 void ReconstructParams::transferFunctionChangedSlot()
165 if(mPresetTFAdapter->getValue() ==
"US Angio")
167 reportDebug(
"Reconstructing angio (Because of angio transfer function)");
168 mAngioAdapter->setValue(
true);
170 else if(mPresetTFAdapter->getValue() ==
"US B-Mode" && mAngioAdapter->getValue())
172 reportDebug(
"Not reconstructing angio (Because of B-Mode transfer function)");
173 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
Utility class for describing a bounded numeric range.
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)
Namespace for all CustusX production code.