void EnvelopeFitRestraint::apply_transformation() { unprotected_evaluate(nullptr); for (unsigned int i = 0; i < ps_.size(); i++) { algebra::Vector3D coord = core::XYZ(ps_[i]).get_coordinates(); core::XYZ(ps_[i]).set_coordinates(transformation_ * coord); } }
void PCAFitRestraint::write_best_projections(std::string file_name, bool evaluate) { if(best_projections_.size() == 0 || evaluate) { unprotected_evaluate(nullptr); } internal::Image2D<>::write_PGM(best_projections_, file_name); }
RegistrationResult Fine2DRegistrationRestraint::get_final_registration() const { IMP_LOG_VERBOSE("Returning the final values for Fine2DRegistrationRestraint " << std::endl); algebra::Vector3D translation = PP_.get_translation(); double s = params_.pixel_size; algebra::Vector2D shift(translation[0] / s, translation[1] / s); double score = unprotected_evaluate(nullptr); RegistrationResult rr(PP_.get_rotation(), shift); rr.set_score(score); return rr; }