34 #ifndef CXELASTIXEXECUTER_H_ 35 #define CXELASTIXEXECUTER_H_ 46 #include "org_custusx_registration_method_commandline_Export.h" 77 void setDisplayProcessMessages(
bool on);
79 bool setInput(QString application,
83 QStringList parameterfiles);
84 virtual void execute();
85 virtual bool isFinished()
const;
86 virtual bool isRunning()
const;
94 QString getNonlinearResultVolume(
bool* ok = 0);
97 void processStateChanged(QProcess::ProcessState newState);
98 void processError(QProcess::ProcessError error);
99 void processFinished(
int, QProcess::ExitStatus);
100 void processReadyRead();
106 QString writeInitTransformToElastixfile(
DataPtr fixed,
DataPtr moving, QString outdir);
110 QString writeInitTransformToCalfile(
DataPtr fixed,
DataPtr moving, QString outdir);
115 QString findMostRecentTransformOutputFile()
const;
158 bool isValid()
const;
159 QString readParameterString(QString key) ;
160 bool readParameterBool(QString key) ;
161 int readParameterInt(QString key) ;
162 std::vector<double> readParameterDoubleVector(QString key) ;
168 QString readParameterRawValue(QString key);
195 retval.
mAngles_xyz = M.matrix().block<3, 3> (0, 0).eulerAngles(0, 1, 2);
217 std::cout <<
"==========TEST==============" << std::endl;
223 std::cout <<
"M\n" << M << std::endl;
224 std::cout <<
"Q\n" << Q << std::endl;
226 std::cout <<
"Q*M.inv\n" << diff << std::endl;
227 if (!
similar(Transform3D::Identity(), diff))
228 reportError(
"assertion failure in ElastixEulerTransform");
236 m = Eigen::AngleAxisd(mAngles_xyz[0], Eigen::Vector3d::UnitX())
237 * Eigen::AngleAxisd(mAngles_xyz[1], Eigen::Vector3d::UnitY())
238 * Eigen::AngleAxisd(mAngles_xyz[2], Eigen::Vector3d::UnitZ());
241 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.