34 #include <QPushButton>
39 #include <vtkCellArray.h>
66 this->setLayout(
new QVBoxLayout);
84 this->updateDifferenceLines();
88 void ICPRegistrationBaseWidget::initialize()
90 delete this->layout();
95 this->initializeProperties();
102 connect(
mObscuredListener.get(), SIGNAL(obscured(
bool)),
this, SLOT(obscuredSlot(
bool)));
106 void ICPRegistrationBaseWidget::initializeProperties()
109 "Ignore LTS, instead attempt to find optimal value",
114 "Fraction of points in the lesser point set to use during each iteration.",
119 "Number of iterations",
124 "Differential RMS stop threshold, between iterations",
129 "Maximum time spent iterating, in seconds",
134 "Data outside a bounding box defined by the intersection\n"
135 "of the fixed/moving by a margin are cropped.",
140 "Use only linear iteration",
145 "Display metric and difference lines between point sets",
147 connect(mDisplayProgress.get(), &
DoubleProperty::changed,
this, &ICPRegistrationBaseWidget::onDisplayProgressChanged);
150 "Registration is done one iteration at a time.",
154 std::vector<PropertyPtr> ICPRegistrationBaseWidget::getAllProperties()
156 std::vector<PropertyPtr> properties;
157 properties.push_back(mLTSRatio);
159 properties.push_back(mMargin);
160 properties.push_back(mLinear);
161 properties.push_back(mDisplayProgress);
163 properties.push_back(mNumberOfIterations);
164 properties.push_back(mStopThreshold);
165 properties.push_back(mMaxTime);
169 void ICPRegistrationBaseWidget::obscuredSlot(
bool obscured)
203 mRegistrator->mt_maximumNumberOfIterations = mNumberOfIterations->getValue();
204 mRegistrator->mt_distanceDeltaStopThreshold = mStopThreshold->getValue();
205 mRegistrator->mt_maximumDurationSeconds = mMaxTime->getValue();
230 bool success =
false;
244 std::cout <<
"v2v linear result:\n" << linearTransform << std::endl;
247 if ((boost::math::isnan)(linearTransform(0,0)))
265 void ICPRegistrationBaseWidget::updateDifferenceLines()
270 bool show = mDisplayProgress->getValue() &&
mRegistrator->isValid();
277 void ICPRegistrationBaseWidget::onDisplayProgressChanged()
279 this->updateDifferenceLines();
QString qstring_cast(const T &val)
cxResource_EXPORT ProfilePtr profile()
static BoolPropertyPtr initialize(const QString &uid, QString name, QString help, bool value, QDomNode root=QDomNode())
boost::shared_ptr< class RegServices > RegServicesPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
QDomElement getElement()
return the current element
void reportWarning(QString msg)
void changed()
emit when the underlying data value is changed: The user interface will be updated.
static DoublePropertyPtr initialize(const QString &uid, QString name, QString help, double value, DoubleRange range, int decimals, QDomNode root=QDomNode())
void reportDebug(QString msg)