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;
137 bool isValid()
const;
138 QString readParameterString(QString key) ;
139 bool readParameterBool(QString key) ;
140 int readParameterInt(QString key) ;
141 std::vector<double> readParameterDoubleVector(QString key) ;
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;
Transform3D createTransformRotateY(const double angle)
void reportError(QString msg)
Base class for algorithms that wants to time their execution.
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class Data > DataPtr
ElastiX command-line wrapper.
boost::shared_ptr< class RegServices > RegServicesPtr
Transform3D createTransformTranslate(const Vector3D &translation)
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
bool similar(const CameraInfo &lhs, const CameraInfo &rhs, double tol)
Transform3D createTransformRotateX(const double angle)
Namespace for all CustusX production code.