13 #ifndef CXELASTIXEXECUTER_H_
14 #define CXELASTIXEXECUTER_H_
25 #include "org_custusx_registration_method_commandline_Export.h"
56 void setDisplayProcessMessages(
bool on);
58 bool setInput(QString application,
62 QStringList parameterfiles);
63 virtual void execute();
64 virtual bool isFinished()
const;
65 virtual bool isRunning()
const;
73 QString getNonlinearResultVolume(
bool* ok = 0);
76 void processStateChanged(QProcess::ProcessState newState);
77 void processError(QProcess::ProcessError error);
78 void processFinished(
int, QProcess::ExitStatus);
79 void processReadyRead();
85 QString writeInitTransformToElastixfile(
DataPtr fixed,
DataPtr moving, QString outdir);
89 QString writeInitTransformToCalfile(
DataPtr fixed,
DataPtr moving, QString outdir);
94 QString findMostRecentTransformOutputFile()
const;
147 QString readParameterRawValue(QString key);
174 retval.
mAngles_xyz = M.matrix().block<3, 3> (0, 0).eulerAngles(0, 1, 2);
196 std::cout <<
"==========TEST==============" << std::endl;
202 std::cout <<
"M\n" << M << std::endl;
203 std::cout <<
"Q\n" << Q << std::endl;
205 std::cout <<
"Q*M.inv\n" << diff << std::endl;
206 if (!
similar(Transform3D::Identity(), diff))
207 reportError(
"assertion failure in ElastixEulerTransform");
215 m = Eigen::AngleAxisd(
mAngles_xyz[0], Eigen::Vector3d::UnitX())
216 * Eigen::AngleAxisd(
mAngles_xyz[1], Eigen::Vector3d::UnitY())
217 * Eigen::AngleAxisd(
mAngles_xyz[2], Eigen::Vector3d::UnitZ());
220 R.matrix().block<3, 3> (0, 0) = m;