EMAN2
aligner.h
Go to the documentation of this file.
1/*
2 * Author: Steven Ludtke, 04/10/2003 (sludtke@bcm.edu)
3 * Copyright (c) 2000-2006 Baylor College of Medicine
4 *
5 * This software is issued under a joint BSD/GNU license. You may use the
6 * source code in this file under either license. However, note that the
7 * complete EMAN2 and SPARX software packages have some GPL dependencies,
8 * so you are responsible for compliance with the licenses of these packages
9 * if you opt to use BSD licensing. The warranty disclaimer below holds
10 * in either instance.
11 *
12 * This complete copyright notice must be included in any revised version of the
13 * source code. Additional authorship citations may be added, but existing
14 * author citations must be preserved.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 *
30 * */
31
32#ifndef eman__aligner_h__
33#define eman__aligner_h__ 1
34
35
36#include "emobject.h"
37
38
39namespace EMAN
40{
41 class EMData;
42 class Cmp;
43
80 class Aligner
81 {
82 public:
83 virtual ~ Aligner()
84 {
85 }
86
87 virtual EMData *align(EMData * this_img, EMData * to_img) const = 0;
88
100 virtual EMData *align(EMData * this_img, EMData * to_img,
101 const string & cmp_name, const Dict& cmp_params) const = 0;
102
106 virtual string get_name() const = 0;
107
108 virtual string get_desc() const = 0;
112 virtual Dict get_params() const
113 {
114 return params;
115 }
116
120 virtual void set_params(const Dict & new_params)
121 {
122 params = new_params;
123 }
124
125 virtual TypeDict get_param_types() const = 0;
126
140 virtual vector<Dict> xform_align_nbest(EMData * this_img, EMData * to_img, const unsigned int nsoln, const string & cmp_name, const Dict& cmp_params) const;
141// {
142// vector<Dict> solns;
143// return solns;
144// }
145
146 protected:
147 mutable Dict params;
148
149// /** Get a Transform pointer that is currently stored in the image header corresponding to the given key.
150// * If non existant then initialize a new Transform pointer, set it as the image attribute, and return it.
151// * The point being that if you have to access the xform.align2d or the xform.align3d
152// * attributes from multiple aligners then you always want to get the same one.
153// * @param key the alignment key such as "xform.align2d" or "xform.align3d"
154// * @param image the image from which the Transform pointer will be extracted (and potentially assigned to if non existant)
155// * @return the Transform pointer that is currently stored in the image header corresponding to the given key.
156// */
157// static Transform* get_align_attr(const string& key, EMData* const image );
158//
159// static Transform* get_set_align_attr(const string& key, EMData* const to_image, const EMData* const from_image );
160 };
161
167 {
168 public:
170 ScaleAlignerABS(const string& ba) : basealigner(ba)
171 {
172 }
173
175 EMData* align_using_base(EMData * this_img, EMData * to_img,
176 const string & cmp_name = "dot", const Dict& cmp_params = Dict()) const;
177
178 protected:
179 const string basealigner;
181
182 };
183
192 {
193 public:
194 virtual EMData * align(EMData * this_img, EMData * to_img,
195 const string & cmp_name = "dot", const Dict& cmp_params = Dict()) const;
196
197 virtual EMData * align(EMData * this_img, EMData * to_img) const
198 {
199 return align(this_img, to_img, "dot", Dict());
200 }
201
202 virtual string get_name() const
203 {
204 return NAME;
205 }
206
207 virtual string get_desc() const
208 {
209 return "Performs real space scale alignment";
210 }
211
212 static Aligner *NEW()
213 {
214 return new ScaleAligner();
215 }
216
217 virtual TypeDict get_param_types() const
218 {
219 TypeDict d;
220 d.put("min", EMObject::FLOAT, "Minimum scaling (default: 0.95)");
221 d.put("max", EMObject::FLOAT, "Maximum scaling (default: 1.05)");
222 d.put("step", EMObject::FLOAT, "Scaling step (default: 0.01)");
223 return d;
224 }
225
226 static const string NAME;
227 };
228
238 {
239 public:
240 virtual EMData * align(EMData * this_img, EMData * to_img,
241 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
242
243 virtual EMData * align(EMData * this_img, EMData * to_img) const
244 {
245 return align(this_img, to_img, "dot", Dict());
246 }
247
248 virtual string get_name() const
249 {
250 return NAME;
251 }
252
253 virtual string get_desc() const
254 {
255 return "Translational 2D and 3D alignment by cross-correlation";
256 }
257
258 static Aligner *NEW()
259 {
260 return new TranslationalAligner();
261 }
262
263 virtual TypeDict get_param_types() const
264 {
265 TypeDict d;
266 d.put("intonly", EMObject::INT,"Integer pixel translations only");
267 d.put("useflcf", EMObject::INT,"Use Fast Local Correlation Function rather than CCF");
268 d.put("maxshift", EMObject::INT,"Maximum translation in pixels");
269 d.put("masked", EMObject::INT,"Treat zero pixels in 'this' as a mask for normalization (default false)");
270 d.put("nozero", EMObject::INT,"Zero translation not permitted (useful for CCD images)");
271 return d;
272 }
273
274 static const string NAME;
275 };
276
282 {
283 public:
284 virtual EMData * align(EMData * this_img, EMData * to_img,
285 const string & cmp_name = "dot", const Dict& cmp_params = Dict()) const;
286
287 virtual EMData * align(EMData * this_img, EMData * to_img) const
288 {
289 return align(this_img, to_img, "dot", Dict());
290 }
291
292 virtual string get_name() const
293 {
294 return NAME;
295 }
296
297 virtual string get_desc() const
298 {
299 return "Performs rotational alignment, even on poorly centered images, but leaves a 180 degree ambiguity which requires a translational alignment to resolve. Usually called internally by rotate_translate aligner.";
300 }
301
302 static Aligner *NEW()
303 {
304 return new RotationalAligner();
305 }
306
307 static EMData * align_180_ambiguous(EMData * this_img, EMData * to_img, int rfp_mode = 2,int zscore=0);
308
309 virtual TypeDict get_param_types() const
310 {
311 TypeDict d;
312 d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print. O is the original eman1 way. 1 is just using calc_ccf without padding. 2 is using calc_mutual_correlation without padding.");
313 d.put("zscore", EMObject::INT,"Either 0 or 1. If set, will convert per-radius CCF curves into Z-score significnace curves before averaging. In theory this should produce better results by focusing on radii with more alignment information. (default=false)");
314 d.put("ambig180", EMObject::INT,"Either 0 or 1. If set, will not try and resolve the 180 degree ambiguity. If not set, it will assume the particle is well centered and resolve the ambiguity that way. default=false");
315 d.put("maxshift", EMObject::INT,"This is provided for compatibility with other aligners. It does absolutely nothing here, as there is an implicit maxshift=0.");
316 return d;
317 }
318
319 static const string NAME;
320 };
321
325 {
326 public:
327 virtual EMData * align(EMData * this_img, EMData * to_img,
328 const string & cmp_name = "dot", const Dict& cmp_params = Dict()) const;
329
330 virtual EMData * align(EMData * this_img, EMData * to_img) const
331 {
332 return align(this_img, to_img, "dot", Dict());
333 }
334
335 virtual string get_name() const
336 {
337 return NAME;
338 }
339
340 virtual string get_desc() const
341 {
342 return "Performs rotational alignment using bispectral invariants";
343 }
344
345 static Aligner *NEW()
346 {
347 return new RotationalAlignerBispec();
348 }
349
350 virtual TypeDict get_param_types() const
351 {
352 TypeDict d;
353 d.put("maxshift", EMObject::INT,"This is provided for compatibility with other aligners. It does absolutely nothing here, as there is an implicit maxshift=0.");
354 d.put("size", EMObject::INT,"Passed as the size parameter to the bispectrum calculation");
355 d.put("rfpn", EMObject::INT,"Passed as the rfp parameter to the bispectrum calculation");
356 d.put("harmonic", EMObject::INT,"If set, uses harmonic power instead of bispectra");
357 return d;
358 }
359
360 static const string NAME;
361 };
362
363
372 {
373 public:
374 virtual EMData * align(EMData * this_img, EMData * to_img,
375 const string & cmp_name = "dot", const Dict& cmp_params = Dict()) const;
376
377 virtual EMData * align(EMData * this_img, EMData * to_img) const
378 {
379 return align(this_img, to_img, "dot", Dict());
380 }
381
382 virtual string get_name() const
383 {
384 return NAME;
385 }
386
387 virtual string get_desc() const
388 {
389 return "Performs rotational alignment using the SPIDER method of iterating between rotational and translational alingment in real-space";
390 }
391
392 static Aligner *NEW()
393 {
394 return new RotationalAlignerIterative();
395 }
396
397 virtual TypeDict get_param_types() const
398 {
399 TypeDict d;
400 d.put("r1", EMObject::INT, "Inner ring, pixels");
401 d.put("r2", EMObject::INT, "Outer ring, pixels");
402 return d;
403 }
404
405 static const string NAME;
406 };
407
411 {
412 public:
413 virtual EMData * align(EMData * this_img, EMData * to_img,
414 const string & cmp_name = "dot", const Dict& cmp_params = Dict()) const;
415
416 virtual EMData * align(EMData * this_img, EMData * to_img) const
417 {
418 return align(this_img, to_img, "dot", Dict());
419 }
420
421 virtual string get_name() const
422 {
423 return NAME;
424 }
425
426 virtual string get_desc() const
427 {
428 return "Performs rotational alignment and works accurately if the image is precentered";
429 }
430
431 static Aligner *NEW()
432 {
433 return new RotatePrecenterAligner();
434 }
435
436 virtual TypeDict get_param_types() const
437 {
438 TypeDict d;
439 return d;
440 }
441
442 static const string NAME;
443 };
444
452 {
453 public:
454 virtual EMData * align(EMData * this_img, EMData * to_img,
455 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
456
457 virtual EMData * align(EMData * this_img, EMData * to_img) const
458 {
459 return align(this_img, to_img, "sqeuclidean", Dict());
460 }
461
462 virtual string get_name() const
463 {
464 return NAME;
465 }
466
467 virtual string get_desc() const
468 {
469 return "Performs rotational alignment and follows this with translational alignment.";
470 }
471
472 static Aligner *NEW()
473 {
474 return new RotateTranslateAligner();
475 }
476
477 virtual TypeDict get_param_types() const
478 {
479 TypeDict d;
480 //d.put("usedot", EMObject::INT);
481 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
482 d.put("nozero", EMObject::INT,"Zero translation not permitted (useful for CCD images)");
483 d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print");
484 d.put("useflcf", EMObject::INT,"Use Fast Local Correlation Function rather than CCF for translational alignment");
485 d.put("zscore", EMObject::INT,"Either 0 or 1. This option is passed directly to the rotational aligner (default=false)");
486 return d;
487 }
488
489 static const string NAME;
490 };
491
498 {
499 public:
500 virtual EMData * align(EMData * this_img, EMData * to_img,
501 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
502
503 virtual EMData * align(EMData * this_img, EMData * to_img) const
504 {
505 return align(this_img, to_img, "sqeuclidean", Dict());
506 }
507
508 virtual string get_name() const
509 {
510 return NAME;
511 }
512
513 virtual string get_desc() const
514 {
515 return "Performs rotational and translational alignment using bispectral invariants.";
516 }
517
518 static Aligner *NEW()
519 {
520 return new RotateTranslateAlignerBispec();
521 }
522
523 virtual TypeDict get_param_types() const
524 {
525 TypeDict d;
526 //d.put("usedot", EMObject::INT);
527 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
528 d.put("nozero", EMObject::INT,"Zero translation not permitted (useful for CCD images)");
529// d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print");
530 d.put("useflcf", EMObject::INT,"Use Fast Local Correlation Function rather than CCF for translational alignment");
531 d.put("size", EMObject::INT,"Passed as the size parameter to the bispectrum calculation");
532 d.put("rfpn", EMObject::INT,"Passed as the rfp parameter to the bispectrum calculation");
533 d.put("harmonic", EMObject::INT,"If set, uses harmonic power instead of bispectra");
534
535// d.put("zscore", EMObject::INT,"Either 0 or 1. This option is passed directly to the rotational aligner (default=false)");
536 return d;
537 }
538
539 static const string NAME;
540 };
541
553 {
554 public:
555
556 //Set the type of base aligner
558 {
559 }
560
561 virtual EMData * align(EMData * this_img, EMData * to_img,
562 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
563
564 virtual EMData * align(EMData * this_img, EMData * to_img) const
565 {
566 return align(this_img, to_img, "sqeuclidean", Dict());
567 }
568
569 virtual string get_name() const
570 {
571 return NAME;
572 }
573
574 virtual string get_desc() const
575 {
576 return "Performs rotational alignment and follows this with translational and then scaling alignment.";
577 }
578
579 static Aligner *NEW()
580 {
581 return new RotateTranslateScaleAligner();
582 }
583
584 virtual TypeDict get_param_types() const
585 {
586 TypeDict d;
587 d.put("min", EMObject::FLOAT, "Minimum scaling (default: 0.95)");
588 d.put("max", EMObject::FLOAT, "Maximum scaling (default: 1.05)");
589 d.put("step", EMObject::FLOAT, "Scaling step (default: 0.01)");
590 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
591 d.put("nozero", EMObject::INT,"Zero translation not permitted (useful for CCD images)");
592 d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print");
593 d.put("useflcf", EMObject::INT,"Use Fast Local Correlation Function rather than CCF for translational alignment");
594 d.put("zscore", EMObject::INT,"Either 0 or 1. This option is passed directly to the rotational aligner (default=false)");
595 return d;
596 }
597
598 static const string NAME;
599 };
600
612 {
613 public:
614 virtual EMData * align(EMData * this_img, EMData * to_img,
615 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
616
617 virtual EMData * align(EMData * this_img, EMData * to_img) const
618 {
619 return align(this_img, to_img, "sqeuclidean", Dict());
620 }
621
622 virtual string get_name() const
623 {
624 return NAME;
625 }
626
627 virtual string get_desc() const
628 {
629 return "Performs rotational alignment and follows this with translational alignment using the iterative method.";
630 }
631
632 static Aligner *NEW()
633 {
635 }
636
637 virtual TypeDict get_param_types() const
638 {
639 TypeDict d;
640 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
641 d.put("r1", EMObject::INT, "Inner ring, pixels");
642 d.put("r2", EMObject::INT, "Outer ring, pixels");
643 d.put("maxiter", EMObject::INT, "Maximum number of iterations");
644 d.put("nozero", EMObject::INT,"Zero translation not permitted (useful for CCD images)");
645 d.put("useflcf", EMObject::INT,"Use Fast Local Correlation Function rather than CCF for translational alignment");
646 return d;
647 }
648
649 static const string NAME;
650 };
651
666 {
667 public:
668 //Set the type of base aligner
670 {
671 }
672
673 virtual EMData * align(EMData * this_img, EMData * to_img,
674 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
675
676 virtual EMData * align(EMData * this_img, EMData * to_img) const
677 {
678 return align(this_img, to_img, "sqeuclidean", Dict());
679 }
680
681 virtual string get_name() const
682 {
683 return NAME;
684 }
685
686 virtual string get_desc() const
687 {
688 return "Performs rotational alignment and follows this with translational alignment using the iterative method. Does this for each scale and returns the best";
689 }
690
691 static Aligner *NEW()
692 {
694 }
695
696 virtual TypeDict get_param_types() const
697 {
698 TypeDict d;
699 d.put("min", EMObject::FLOAT, "Minimum scaling (default: 0.95)");
700 d.put("max", EMObject::FLOAT, "Maximum scaling (default: 1.05)");
701 d.put("step", EMObject::FLOAT, "Scaling step (default: 0.01)");
702 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
703 d.put("r1", EMObject::INT, "Inner ring, pixels");
704 d.put("r2", EMObject::INT, "Outer ring, pixels");
705 d.put("maxiter", EMObject::INT, "Maximum number of iterations");
706 d.put("nozero", EMObject::INT,"Zero translation not permitted (useful for CCD images)");
707 d.put("useflcf", EMObject::INT,"Use Fast Local Correlation Function rather than CCF for translational alignment");
708 return d;
709 }
710
711 static const string NAME;
712 };
713
724 {
725 public:
726 virtual EMData * align(EMData * this_img, EMData * to_img,
727 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
728
729 virtual EMData * align(EMData * this_img, EMData * to_img) const
730 {
731 return align(this_img, to_img, "sqeuclidean", Dict());
732 }
733
734 virtual string get_name() const
735 {
736 return NAME;
737 }
738
739 virtual string get_desc() const
740 {
741 return "Performs rotational alignment and translation align by resampling to polar coordinates in real space.";
742 }
743
744 static Aligner *NEW()
745 {
746 return new RotateTranslateAlignerPawel();
747 }
748
749 virtual TypeDict get_param_types() const
750 {
751 TypeDict d;
752 //d.put("usedot", EMObject::INT);
753 d.put("tx", EMObject::INT, "Maximum x translation in pixels, Default = 0");
754 d.put("ty", EMObject::INT, "Maximum y translation in pixels, Default = 0");
755 d.put("r1", EMObject::INT, "Inner ring, pixels");
756 d.put("r2", EMObject::INT, "Outer ring, pixels");
757 return d;
758 }
759
760 static const string NAME;
761 };
762
768 {
769 public:
770 virtual EMData * align(EMData * this_img, EMData * to_img,
771 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
772
773 virtual EMData * align(EMData * this_img, EMData * to_img) const
774 {
775 return align(this_img, to_img, "frc", Dict());
776 }
777
778 virtual string get_name() const
779 {
780 return NAME;
781 }
782
783 virtual string get_desc() const
784 {
785 return "Full 2D alignment using 'Rotational' and 'Translational', also incorporates 2D 'Refine' alignments.";
786 }
787
788 static Aligner *NEW()
789 {
790 return new RotateTranslateBestAligner();
791 }
792
793 virtual TypeDict get_param_types() const
794 {
795 TypeDict d;
796 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
797 d.put("snr", EMObject::FLOATARRAY, "signal to noise ratio array");
798 return d;
799 }
800
801 static const string NAME;
802 };
803
810 {
811 public:
812 virtual EMData * align(EMData * this_img, EMData * to_img,
813 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
814 virtual EMData * align(EMData * this_img, EMData * to_img) const
815 {
816 return align(this_img, to_img, "dot", Dict());
817 }
818 virtual string get_name() const
819 {
820 return NAME;
821 }
822
823 virtual string get_desc() const
824 {
825 return "Performs two rotational alignments, one using the original image and one using the hand-flipped image. Decides which alignment is better using a comparitor and returns it";
826 }
827
828 static Aligner *NEW()
829 {
830 return new RotateFlipAligner();
831 }
832
833 virtual TypeDict get_param_types() const
834 {
835 return static_get_param_types();
836 }
837
839 TypeDict d;
840
841 d.put("imask", EMObject::INT);
842 d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print");
843 return d;
844 }
845
846 static const string NAME;
847 };
848
856 {
857 public:
858 virtual EMData * align(EMData * this_img, EMData * to_img,
859 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
860 virtual EMData * align(EMData * this_img, EMData * to_img) const
861 {
862 return align(this_img, to_img, "dot", Dict());
863 }
864 virtual string get_name() const
865 {
866 return NAME;
867 }
868
869 virtual string get_desc() const
870 {
871 return "Performs two rotational alignments, iterative style, one using the original image and one using the hand-flipped image. Decides which alignment is better using a comparitor and returns it";
872 }
873
874 static Aligner *NEW()
875 {
876 return new RotateFlipAlignerIterative();
877 }
878
879 virtual TypeDict get_param_types() const
880 {
881 return static_get_param_types();
882 }
883
885 TypeDict d;
886 d.put("r1", EMObject::INT, "Inner ring, pixels");
887 d.put("r2", EMObject::INT, "Outer ring, pixels");
888 return d;
889 }
890
891 static const string NAME;
892 };
893
901 {
902 public:
903 virtual EMData * align(EMData * this_img, EMData * to_img,
904 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
905 virtual EMData * align(EMData * this_img, EMData * to_img) const
906 {
907 return align(this_img, to_img, "sqeuclidean", Dict());
908 }
909
910 virtual string get_name() const
911 {
912 return NAME;
913 }
914
915 virtual string get_desc() const
916 {
917 return " Does two 'rotate_translate' alignments, one to accommodate for possible handedness change. Decided which alignment is better using a comparitor and returns the aligned image as the solution";
918 }
919
920 static Aligner *NEW()
921 {
922 return new RotateTranslateFlipAligner();
923 }
924
925 virtual TypeDict get_param_types() const
926 {
927 return static_get_param_types();
928 }
929
931 TypeDict d;
932
933 d.put("flip", EMObject::EMDATA);
934 d.put("usedot", EMObject::INT);
935 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
936 d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print");
937 d.put("usebispec", EMObject::INT,"Uses rotate_translate_bispec for subalignments and ignore rfp_mode.");
938 d.put("useharmonic", EMObject::INT,"Uses rotate_translate_bispec in harmonic mode for alignments and ignores rfp_mode.");
939 d.put("useflcf", EMObject::INT,"Use Fast Local Correlation Function rather than CCF for translational alignment");
940 d.put("zscore", EMObject::INT,"Either 0 or 1. This option is passed directly to the rotational aligner (default=false)");
941 return d;
942 }
943
944 static const string NAME;
945 };
946
959 {
960 public:
961 //Set the type of base aligner
963 {
964 }
965
966 virtual EMData * align(EMData * this_img, EMData * to_img,
967 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
968
969 virtual EMData * align(EMData * this_img, EMData * to_img) const
970 {
971 return align(this_img, to_img, "sqeuclidean", Dict());
972 }
973
974 virtual string get_name() const
975 {
976 return NAME;
977 }
978
979 virtual string get_desc() const
980 {
981 return "Performs rotational alignment and follows this with translational and then scaling alignment.";
982 }
983
984 static Aligner *NEW()
985 {
987 }
988
989 virtual TypeDict get_param_types() const
990 {
991 TypeDict d;
992 d.put("min", EMObject::FLOAT, "Minimum scaling (default: 0.95)");
993 d.put("max", EMObject::FLOAT, "Maximum scaling (default: 1.05)");
994 d.put("step", EMObject::FLOAT, "Scaling step (default: 0.01)");
995 d.put("flip", EMObject::EMDATA);
996 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
997 d.put("nozero", EMObject::INT,"Zero translation not permitted (useful for CCD images)");
998 d.put("rfp_mode", EMObject::INT,"Either 0,1 or 2. A temporary flag for testing the rotational foot print");
999 d.put("useflcf", EMObject::INT,"Use Fast Local Correlation Function rather than CCF for translational alignment");
1000 d.put("zscore", EMObject::INT,"Either 0 or 1. This option is passed directly to the rotational aligner (default=false)");
1001 return d;
1002 }
1003
1004 static const string NAME;
1005 };
1006
1017 {
1018 public:
1019 virtual EMData * align(EMData * this_img, EMData * to_img,
1020 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
1021 virtual EMData * align(EMData * this_img, EMData * to_img) const
1022 {
1023 return align(this_img, to_img, "sqeuclidean", Dict());
1024 }
1025
1026 virtual string get_name() const
1027 {
1028 return NAME;
1029 }
1030
1031 virtual string get_desc() const
1032 {
1033 return " Does two 'rotate_translate.iterative' alignments, one to accommodate for possible handedness change. Decided which alignment is better using a comparitor and returns the aligned image as the solution";
1034 }
1035
1036 static Aligner *NEW()
1037 {
1039 }
1040
1042 {
1043 return static_get_param_types();
1044 }
1045
1047 TypeDict d;
1048 d.put("flip", EMObject::EMDATA);
1049 d.put("r1", EMObject::INT, "Inner ring, pixels");
1050 d.put("r2", EMObject::INT, "Outer ring, pixels");
1051 d.put("maxiter", EMObject::INT, "Maximum number of iterations");
1052 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
1053 return d;
1054 }
1055
1056 static const string NAME;
1057 };
1058
1073 {
1074 public:
1075 //Set the type of base aligner
1076 RotateTranslateFlipScaleAlignerIterative() : ScaleAlignerABS("rotate_translate_flip_iterative")
1077 {
1078 }
1079
1080 virtual EMData * align(EMData * this_img, EMData * to_img,
1081 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
1082
1083 virtual EMData * align(EMData * this_img, EMData * to_img) const
1084 {
1085 return align(this_img, to_img, "sqeuclidean", Dict());
1086 }
1087
1088 virtual string get_name() const
1089 {
1090 return NAME;
1091 }
1092
1093 virtual string get_desc() const
1094 {
1095 return "Performs rotational alignment and follows this with translational alignment using the iterative method. Does this for each scale and returns the best";
1096 }
1097
1098 static Aligner *NEW()
1099 {
1101 }
1102
1104 {
1105 TypeDict d;
1106 d.put("min", EMObject::FLOAT, "Minimum scaling (default: 0.95)");
1107 d.put("max", EMObject::FLOAT, "Maximum scaling (default: 1.05)");
1108 d.put("step", EMObject::FLOAT, "Scaling step (default: 0.01)");
1109 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
1110 d.put("flip", EMObject::EMDATA);
1111 d.put("r1", EMObject::INT, "Inner ring, pixels");
1112 d.put("r2", EMObject::INT, "Outer ring, pixels");
1113 d.put("maxiter", EMObject::INT, "Maximum number of iterations");
1114 return d;
1115 }
1116
1117 static const string NAME;
1118 };
1119
1130 {
1131 public:
1132 virtual EMData * align(EMData * this_img, EMData * to_img,
1133 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
1134
1135 virtual EMData * align(EMData * this_img, EMData * to_img) const
1136 {
1137 return align(this_img, to_img, "sqeuclidean", Dict());
1138 }
1139
1140 virtual string get_name() const
1141 {
1142 return NAME;
1143 }
1144
1145 virtual string get_desc() const
1146 {
1147 return "Performs rotational alignment, translation align, and flip by resampling to polar coordinates in real space.";
1148 }
1149
1150 static Aligner *NEW()
1151 {
1153 }
1154
1156 {
1157 TypeDict d;
1158 //d.put("usedot", EMObject::INT);
1159 d.put("tx", EMObject::INT, "Maximum x translation in pixels, Default = 0");
1160 d.put("ty", EMObject::INT, "Maximum y translation in pixels, Default = 0");
1161 d.put("r1", EMObject::INT, "Inner ring, pixels");
1162 d.put("r2", EMObject::INT, "Outer ring, pixels");
1163 return d;
1164 }
1165
1166 static const string NAME;
1167 };
1168
1174 {
1175 public:
1176 virtual EMData * align(EMData * this_img, EMData * to_img,
1177 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
1178 virtual EMData * align(EMData * this_img, EMData * to_img) const
1179 {
1180 return align(this_img, to_img, "sqeuclidean", Dict());
1181 }
1182
1183 virtual string get_name() const
1184 {
1185 return NAME;
1186 }
1187
1188 virtual string get_desc() const
1189 {
1190 return "Experimental full 2D alignment with handedness check using semi-exhaustive search (not necessarily better than RTFBest)";
1191 }
1192
1193 static Aligner *NEW()
1194 {
1195 return new RTFExhaustiveAligner();
1196 }
1197
1199 {
1200 TypeDict d;
1201
1202 d.put("flip", EMObject::EMDATA);
1203 d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
1204 return d;
1205 }
1206
1207 static const string NAME;
1208 };
1209
1218 {
1219 public:
1220 virtual EMData * align(EMData * this_img, EMData * to_img,
1221 const string & cmp_name, const Dict& cmp_params) const;
1222 virtual EMData * align(EMData * this_img, EMData * to_img) const
1223 {
1224 return align(this_img, to_img, "sqeuclidean", Dict());
1225 }
1226 virtual string get_name() const
1227 {
1228 return NAME;
1229 }
1230
1231 virtual string get_desc() const
1232 {
1233 return "Experimental full 2D alignment with handedness check using more exhaustive search (not necessarily better than RTFBest)";
1234 }
1235
1236 static Aligner *NEW()
1237 {
1238 return new RTFSlowExhaustiveAligner();
1239 }
1240
1242 {
1243 TypeDict d;
1244 d.put("flip", EMObject::EMDATA,"Optional. This is the flipped version of the images that is being aligned. If specified it will be used for the handedness check, if not a flipped copy of the image will be made");
1245 d.put("maxshift", EMObject::INT,"The maximum length of the detectable translational shift");
1246 d.put("transtep", EMObject::FLOAT,"The translation step to take when honing the alignment, which occurs after coarse alignment");
1247 d.put("angstep", EMObject::FLOAT,"The angular step (in degrees) to take in the exhaustive search for the solution angle. Typically very small i.e. 3 or smaller.");
1248 return d;
1249 }
1250
1251 static const string NAME;
1252 };
1253
1262 {
1263 public:
1264 virtual EMData * align(EMData * this_img, EMData * to_img, const string & cmp_name="ccc", const Dict& cmp_params = Dict()) const;
1265
1266 virtual EMData * align(EMData * this_img, EMData * to_img) const
1267 {
1268 return align(this_img, to_img, "ccc", Dict());
1269 }
1270 virtual string get_name() const
1271 {
1272 return NAME;
1273 }
1274
1275 static Aligner *NEW()
1276 {
1277 return new SymAlignProcessor();
1278 }
1279
1281 {
1282 TypeDict d;
1283 d.put("sym", EMObject::STRING, "The symmetry under which to do the alignment, Default=c1" );
1284 d.put("delta", EMObject::FLOAT,"Angle the separates points on the sphere. This is exclusive of the \'n\' paramater. Default is 10");
1285 d.put("dphi", EMObject::FLOAT,"The angle increment in the phi direction. Default is 10");
1286 d.put("lphi", EMObject::FLOAT,"Lower bound for phi. Default it 0");
1287 d.put("uphi", EMObject::FLOAT,"Upper bound for phi. Default it 359.9");
1288 d.put("avger", EMObject::STRING, "The sort of averager to use, Default=mean" );
1289 return d;
1290 }
1291
1292 virtual string get_desc() const
1293 {
1294 return "The image is centered and rotated to the standard orientation for the specified symmetry";
1295 }
1296
1297 static const string NAME;
1298
1299 };
1300
1313 {
1314 public:
1315 virtual EMData * align(EMData * this_img, EMData * to_img,
1316 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
1317
1318 virtual EMData * align(EMData * this_img, EMData * to_img) const
1319 {
1320 return align(this_img, to_img, "sqeuclidean", Dict());
1321 }
1322
1323 virtual string get_name() const
1324 {
1325 return NAME;
1326 }
1327
1328 virtual string get_desc() const
1329 {
1330 return "Refines a preliminary 2D alignment using a simplex algorithm. Subpixel precision.";
1331 }
1332
1333 static Aligner *NEW()
1334 {
1335 return new RefineAligner();
1336 }
1337
1339 {
1340 TypeDict d;
1341
1342 d.put("mode", EMObject::INT, "Currently unused");
1343 d.put("xform.align2d", EMObject::TRANSFORM, "The Transform storing the starting guess. If unspecified the identity matrix is used");
1344 d.put("stepx", EMObject::FLOAT, "The x increment used to create the starting simplex. Default is 1");
1345 d.put("stepy", EMObject::FLOAT, "The y increment used to create the starting simplex. Default is 1");
1346 d.put("stepaz", EMObject::FLOAT, "The rotational increment used to create the starting simplex. Default is 5");
1347 d.put("precision", EMObject::FLOAT, "The precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations. Default is 0.04.");
1348 d.put("maxiter", EMObject::INT,"The maximum number of iterations that can be performed by the Simplex minimizer. default=28");
1349 d.put("maxshift", EMObject::INT,"Maximum translation in pixels in any direction. If the solution yields a shift beyond this value in any direction, then the refinement is judged a failure and the original alignment is used as the solution.");
1350 d.put("stepscale", EMObject::FLOAT, "If set to any non-zero value, scale will be included in the alignment, and this will be the initial step. Images should be edgenormalized. If the scale goes beyond +-30% alignment will fail.");
1351 d.put("mask", EMObject::EMDATA, "A mask to be applied to the image being aligned prior to each similarity comparison.");
1352 d.put("verbose", EMObject::INT, "This will cause debugging information to be printed on the screen for the iterative refinement. Larger numbers -> more info. default=0");
1353 return d;
1354 }
1355
1356 static const string NAME;
1357 };
1358
1359
1370 {
1371 public:
1372 virtual EMData * align(EMData * this_img, EMData * to_img,
1373 const string & cmp_name="dot", const Dict& cmp_params = Dict()) const;
1374
1375 virtual EMData * align(EMData * this_img, EMData * to_img) const
1376 {
1377 return align(this_img, to_img, "sqeuclidean", Dict());
1378 }
1379
1380 virtual string get_name() const
1381 {
1382 return NAME;
1383 }
1384
1385 virtual string get_desc() const
1386 {
1387 return "Refines a preliminary 2D alignment using a simplex algorithm. Subpixel precision.";
1388 }
1389
1390 static Aligner *NEW()
1391 {
1392 return new RefineAlignerCG();
1393 }
1394
1396 {
1397 TypeDict d;
1398
1399 d.put("mode", EMObject::INT, "Currently unused");
1400 d.put("xform.align2d", EMObject::TRANSFORM, "The Transform storing the starting guess. If unspecified the identity matrix is used");
1401 d.put("step", EMObject::FLOAT, "The x increment used to create the starting simplex. Default is 0.1");
1402 d.put("precision", EMObject::FLOAT, "The precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations. Default is 0.02.");
1403 d.put("maxiter", EMObject::INT,"The maximum number of iterations that can be performed by the Simplex minimizer. default=12");
1404 d.put("maxshift", EMObject::INT,"Maximum translation in pixels in any direction. If the solution yields a shift beyond this value in any direction, then the refinement is judged a failure and the original alignment is used as the solution.");
1405 d.put("stepscale", EMObject::FLOAT, "If set to any non-zero value, scale will be included in the alignment. Images should be edgenormalized. If the scale goes beyond +-30% alignment will fail.");
1406 d.put("mask", EMObject::EMDATA, "A mask to be applied to the image being aligned prior to each similarity comparison.");
1407 d.put("verbose", EMObject::INT, "This will cause debugging information to be printed on the screen for the iterative refinement. Larger numbers -> more info. default=0");
1408 return d;
1409 }
1410
1411 static const string NAME;
1412 };
1413
1421 {
1422 public:
1423 virtual EMData * align(EMData * this_img, EMData * to_img,
1424 const string & cmp_name="ccc", const Dict& cmp_params = Dict()) const;
1425
1426 virtual EMData * align(EMData * this_img, EMData * to_img) const
1427 {
1428 return align(this_img, to_img, "ccc", Dict());
1429 }
1430
1431 virtual string get_name() const
1432 {
1433 return NAME;
1434 }
1435 static Aligner *NEW()
1436 {
1437 return new SymAlignProcessorQuat();
1438 }
1439 string get_desc() const
1440 {
1441 return "Finds the symmetry axis using the simplex algorithm.";
1442 }
1444 {
1445 TypeDict d;
1446 d.put("sym", EMObject::STRING, "The symmettry. Default is c1");
1447 d.put("xform.align3d", EMObject::TRANSFORM, "The initial guess for to align the particel to sym axis");
1448 d.put("stepx", EMObject::FLOAT, "The initial simplex step size in x. Default is 1");
1449 d.put("stepy", EMObject::FLOAT, "The initial simplex step size in y. Default is 1");
1450 d.put("stepz", EMObject::FLOAT, "The initial simplex step size in z. Default is 1." );
1451 d.put("stepn0", EMObject::FLOAT, "The initial simplex step size in the first quaternion vecotr component. Default is 1." );
1452 d.put("stepn1", EMObject::FLOAT, "The initial simplex step size in the second quaternion vecotr component. Default is 1." );
1453 d.put("stepn2", EMObject::FLOAT, "The initial simplex step size in the third quaternion vecotr component. Default is 1." );
1454 d.put("spin_coeff", EMObject::FLOAT,"The multiplier appied to the spin (if it is too small or too large the simplex will not converge). Default is 10.");
1455 d.put("precision", EMObject::FLOAT, "The precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations. Default is 0.01." );
1456 d.put("maxiter", EMObject::INT, "The maximum number of iterations that can be performed by the Simplex minimizer. Default is 100.");
1457 d.put("maxshift", EMObject::INT,"Maximum translation in pixels in any direction. If the solution yields a shift beyond this value in any direction, then the refinement is judged a failure and the original alignment is used as the solution.");
1458 return d;
1459 }
1460 static const string NAME;
1461 };
1462
1482 {
1483 public:
1484 virtual EMData * align(EMData * this_img, EMData * to_img,
1485 const string & cmp_name="sqeuclidean", const Dict& cmp_params = Dict()) const;
1486
1487 virtual EMData * align(EMData * this_img, EMData * to_img) const
1488 {
1489 return align(this_img, to_img, "sqeuclidean", Dict());
1490 }
1491
1492 virtual string get_name() const
1493 {
1494 return NAME;
1495 }
1496
1497 virtual string get_desc() const
1498 {
1499 return "Refines a preliminary 3D alignment using a simplex algorithm. Subpixel precision.";
1500 }
1501
1502 static Aligner *NEW()
1503 {
1504 return new Refine3DAlignerGrid();
1505 }
1506
1508 {
1509 TypeDict d;
1510 d.put("xform.align3d", EMObject::TRANSFORM,"The Transform storing the starting guess. If unspecified the identity matrix is used");
1511 d.put("delta", EMObject::FLOAT, "The angular step size. Default is 1." );
1512 d.put("range", EMObject::FLOAT, "The angular range size. Default is 10." );
1513 d.put("dotrans", EMObject::BOOL,"Do a translational search. Default is True(1)");
1514 d.put("search", EMObject::INT,"The maximum length of the detectable translational shift - if you supply this parameter you can not supply the maxshiftx, maxshifty or maxshiftz parameters. Each approach is mutually exclusive.");
1515 d.put("searchx", EMObject::INT,"The maximum length of the detectable translational shift in the x direction- if you supply this parameter you can not supply the maxshift parameters. Default is 3.");
1516 d.put("searchy", EMObject::INT,"The maximum length of the detectable translational shift in the y direction- if you supply this parameter you can not supply the maxshift parameters. Default is 3.");
1517 d.put("searchz", EMObject::INT,"The maximum length of the detectable translational shift in the z direction- if you supply this parameter you can not supply the maxshift parameters. Default is 3");
1518 d.put("verbose", EMObject::BOOL,"Turn this on to have useful information printed to standard out.");
1519 return d;
1520 }
1521
1522 static const string NAME;
1523 };
1524
1547 {
1548 public:
1549 virtual EMData * align(EMData * this_img, EMData * to_img,
1550 const string & cmp_name="sqeuclidean", const Dict& cmp_params = Dict()) const;
1551
1552 virtual EMData * align(EMData * this_img, EMData * to_img) const
1553 {
1554 return align(this_img, to_img, "sqeuclidean", Dict());
1555 }
1556
1557 virtual string get_name() const
1558 {
1559 return NAME;
1560 }
1561
1562 virtual string get_desc() const
1563 {
1564 return "Refines a preliminary 3D alignment using a simplex algorithm. Subpixel precision.";
1565 }
1566
1567 static Aligner *NEW()
1568 {
1569 return new Refine3DAlignerQuaternion();
1570 }
1571
1573 {
1574 TypeDict d;
1575 d.put("xform.align3d", EMObject::TRANSFORM,"The Transform storing the starting guess. If unspecified the identity matrix is used");
1576 d.put("stepx", EMObject::FLOAT, "The initial simplex step size in x. Default is 1");
1577 d.put("stepy", EMObject::FLOAT, "The initial simplex step size in y. Default is 1");
1578 d.put("stepz", EMObject::FLOAT, "The initial simplex step size in z. Default is 1." );
1579 d.put("stepn0", EMObject::FLOAT, "The initial simplex step size in the first quaternion vecotr component. Default is 1." );
1580 d.put("stepn1", EMObject::FLOAT, "The initial simplex step size in the second quaternion vecotr component. Default is 1." );
1581 d.put("stepn2", EMObject::FLOAT, "The initial simplex step size in the third quaternion vecotr component. Default is 1." );
1582 d.put("spin_coeff", EMObject::FLOAT,"The multiplier appied to the spin (if it is too small or too large the simplex will not converge). Default is 10.");
1583 d.put("precision", EMObject::FLOAT, "The precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations. Default is 0.01." );
1584 d.put("maxiter", EMObject::INT, "The maximum number of iterations that can be performed by the Simplex minimizer. Default is 100.");
1585 d.put("maxshift", EMObject::INT,"Maximum translation in pixels in any direction. If the solution yields a shift beyond this value in any direction, then the refinement is judged a failure and the original alignment is used as the solution.");
1586 return d;
1587 }
1588
1589 static const string NAME;
1590 };
1591
1616 {
1617 public:
1620 virtual EMData * align(EMData * this_img, EMData * to_img,
1621 const string & cmp_name="ccc.tomo", const Dict& cmp_params = Dict()) const;
1624 virtual EMData * align(EMData * this_img, EMData * to_img) const
1625 {
1626 return align(this_img, to_img, "ccc.tomo", Dict());
1627 }
1628
1629
1632 virtual vector<Dict> xform_align_nbest(EMData * this_img, EMData * to_img, const unsigned int nsoln, const string & cmp_name, const Dict& cmp_params) const;
1633
1634 virtual string get_name() const
1635 {
1636 return NAME;
1637 }
1638
1639 virtual string get_desc() const
1640 {
1641 return "3D rotational and translational alignment using specified ranges and maximum shifts";
1642 }
1643
1644 static Aligner *NEW()
1645 {
1646 return new RT3DGridAligner();
1647 }
1648
1650 {
1651 TypeDict d;
1652 d.put("daz", EMObject::FLOAT,"The angle increment in the azimuth direction. Default is 10");
1653 d.put("az0", EMObject::FLOAT,"Lower bound for the azimuth direction. Default it 0");
1654 d.put("az1", EMObject::FLOAT,"Upper bound for the azimuth direction. Default it 180.0");
1655 d.put("dphi", EMObject::FLOAT,"The angle increment in the phi direction. Default is 10");
1656 d.put("phi0", EMObject::FLOAT,"Lower bound for the phi direction. Default it 0");
1657 d.put("phi1", EMObject::FLOAT,"Upper bound for the phi direction. Default it 360.0");
1658 d.put("dalt", EMObject::FLOAT,"The angle increment in the altitude direction. Default is 10");
1659 d.put("alt0", EMObject::FLOAT,"Lower bound for the altitude direction. Default it 0");
1660 d.put("alt1", EMObject::FLOAT,"Upper bound for the altitude direction. Default it 360.0");
1661 d.put("dotrans", EMObject::BOOL,"Do a translational search. Default is True(1)");
1662 d.put("search", EMObject::INT,"The maximum length of the detectable translational shift - if you supply this parameter you can not supply the maxshiftx, maxshifty or maxshiftz parameters. Each approach is mutually exclusive.");
1663 d.put("searchx", EMObject::INT,"The maximum length of the detectable translational shift in the x direction- if you supply this parameter you can not supply the maxshift parameters. Default is 3.");
1664 d.put("searchy", EMObject::INT,"The maximum length of the detectable translational shift in the y direction- if you supply this parameter you can not supply the maxshift parameters. Default is 3.");
1665 d.put("searchz", EMObject::INT,"The maximum length of the detectable translational shift in the z direction- if you supply this parameter you can not supply the maxshift parameters. Default is 3");
1666 d.put("initxform", EMObject::TRANSFORM,"The Transform storing the starting position. If unspecified the identity matrix is used");
1667 d.put("verbose", EMObject::BOOL,"Turn this on to have useful information printed to standard out.");
1668 return d;
1669 }
1670
1671 static const string NAME;
1672 };
1673
1700 {
1701 public:
1704 virtual EMData * align(EMData * this_img, EMData * to_img,
1705 const string & cmp_name= "sqeuclidean", const Dict& cmp_params = Dict()) const;
1708 virtual EMData * align(EMData * this_img, EMData * to_img) const
1709 {
1710 return align(this_img, to_img, "sqeuclidean", Dict());
1711 }
1712
1713
1716 virtual vector<Dict> xform_align_nbest(EMData * this_img, EMData * to_img, const unsigned int nsoln, const string & cmp_name, const Dict& cmp_params) const;
1717
1718 virtual string get_name() const
1719 {
1720 return NAME;
1721 }
1722
1723 virtual string get_desc() const
1724 {
1725 return "3D rotational and translational alignment using spherical sampling. Can reduce the search space if symmetry is supplied";
1726 }
1727
1728 static Aligner *NEW()
1729 {
1730 return new RT3DSphereAligner();
1731 }
1732
1734 {
1735 TypeDict d;
1736 d.put("sym", EMObject::STRING,"The symmtery to use as the basis of the spherical sampling. Default is c1 (asymmetry).");
1737 d.put("orientgen", EMObject::STRING,"Advanced. The orientation generation strategy. Default is eman");
1738 d.put("delta", EMObject::FLOAT,"Angle the separates points on the sphere. This is exclusive of the \'n\' paramater. Default is 10");
1739 d.put("n", EMObject::INT,"An alternative to the delta argument, this is the number of points you want generated on the sphere. Default is OFF");
1740 d.put("dphi", EMObject::FLOAT,"The angle increment in the phi direction. Default is 10");
1741 d.put("phi0", EMObject::FLOAT,"Lower bound for phi. Default it 0");
1742 d.put("phi1", EMObject::FLOAT,"Upper bound for phi. Default it 360");
1743 d.put("dotrans", EMObject::BOOL,"Do a translational search. Default is True(1)");
1744 d.put("search", EMObject::INT,"The maximum length of the detectable translational shift - if you supply this parameter you can not supply the maxshiftx, maxshifty or maxshiftz parameters. Each approach is mutually exclusive.");
1745 d.put("searchx", EMObject::INT,"The maximum length of the detectable translational shift in the x direction- if you supply this parameter you can not supply the maxshift parameters. Default is 3.");
1746 d.put("searchy", EMObject::INT,"The maximum length of the detectable translational shift in the y direction- if you supply this parameter you can not supply the maxshift parameters. Default is 3.");
1747 d.put("searchz", EMObject::INT,"The maximum length of the detectable translational shift in the z direction- if you supply this parameter you can not supply the maxshift parameters. Default is 3");
1748 d.put("initxform", EMObject::TRANSFORM,"The Transform storing the starting position. If unspecified the identity matrix is used");
1749 d.put("verbose", EMObject::BOOL,"Turn this on to have useful information printed to standard out.");
1750 return d;
1751 }
1752
1753 static const string NAME;
1754 };
1755
1763 {
1764 public:
1767 virtual EMData * align(EMData * this_img, EMData * to_img,
1768 const string & cmp_name= "sqeuclidean", const Dict& cmp_params = Dict()) const;
1771 virtual EMData * align(EMData * this_img, EMData * to_img) const
1772 {
1773 return align(this_img, to_img, "sqeuclidean", Dict());
1774 }
1775
1776
1779 virtual vector<Dict> xform_align_nbest(EMData * this_img, EMData * to_img, const unsigned int nsoln, const string & cmp_name, const Dict& cmp_params) const;
1780
1781 virtual string get_name() const
1782 {
1783 return NAME;
1784 }
1785
1786 virtual string get_desc() const
1787 {
1788 return "2D rotational and translational alignment using a hierarchical approach in Fourier space. flip options specifies whether this is RT or RTF. No 'refine' alignment should be required +-1 pixel.";
1789 }
1790
1791 static Aligner *NEW()
1792 {
1793 return new RT2DTreeAligner();
1794 }
1795
1796
1798 {
1799 TypeDict d;
1800// d.put("sigmathis", EMObject::FLOAT,"Only Fourier voxels larger than sigma times this value will be considered");
1801// d.put("initxform", EMObject::TRANSFORM,"The Transform storing the starting position. If unspecified the identity matrix is used");
1802 d.put("flip", EMObject::BOOL,"Include flip in the alignment search. Default True");
1803 d.put("verbose", EMObject::INT,"Turn this on to have useful information printed to standard out.");
1804 d.put("maxshift", EMObject::INT,"Maximum acceptable translation. Used only approximately.");
1805 d.put("maxres", EMObject::FLOAT,"Maximum resolution to consider when full sampling is used");
1806 return d;
1807 }
1808
1809 static const string NAME;
1810
1811 private:
1812 bool testort(EMData *small_this, EMData *small_to,vector<float> &sigmathisv,vector<float> &sigmatov, vector<float> &s_score, vector<float> &s_coverage,vector<Transform> &s_xform,int i,Dict &upd) const;
1813
1814 };
1815
1826 {
1827 public:
1830 virtual EMData * align(EMData * this_img, EMData * to_img,
1831 const string & cmp_name= "sqeuclidean", const Dict& cmp_params = Dict()) const;
1834 virtual EMData * align(EMData * this_img, EMData * to_img) const
1835 {
1836 return align(this_img, to_img, "sqeuclidean", Dict());
1837 }
1838
1839
1842 virtual vector<Dict> xform_align_nbest(EMData * this_img, EMData * to_img, const unsigned int nsoln, const string & cmp_name, const Dict& cmp_params) const;
1843
1844 virtual string get_name() const
1845 {
1846 return NAME;
1847 }
1848
1849 virtual string get_desc() const
1850 {
1851 return "3D rotational and translational alignment using a hierarchical approach in Fourier space. Should be very fast and not require 'refine' alignment.";
1852 }
1853
1854 static Aligner *NEW()
1855 {
1856 return new RT2Dto3DTreeAligner();
1857 }
1858
1860 {
1861 TypeDict d;
1862 d.put("sym", EMObject::STRING,"The symmtery to use as the basis of the spherical sampling. Default is c1 (no symmetry)");
1863 d.put("maxshift", EMObject::INT,"maximum shift allowed");
1864// d.put("sigmathis", EMObject::FLOAT,"Only Fourier voxels larger than sigma times this value will be considered");
1865// d.put("sigmato", EMObject::FLOAT,"Only Fourier voxels larger than sigma times this value will be considered");
1866 d.put("initxform", EMObject::TRANSFORMARRAY,"An array of Transforms storing the starting positions.");
1867 d.put("maxang", EMObject::FLOAT,"maximum angle from initial rotation.");
1868 d.put("verbose", EMObject::BOOL,"Turn this on to have useful information printed to standard out.");
1869 d.put("maxres", EMObject::FLOAT,"Maximum resolution to consider when full sampling is used");
1870 d.put("minres", EMObject::FLOAT,"Minimum resolution to consider when full sampling is used");
1871 return d;
1872 }
1873
1874 static const string NAME;
1875
1876 private:
1877 bool testort(EMData *small_this, EMData *small_to,vector<float> &s_score,vector<Transform> &s_xform,int i,Dict &upd, Transform initxf, int maxshift, int maxang) const;
1878
1879 };
1880
1881
1890 {
1891 public:
1894 virtual EMData * align(EMData * this_img, EMData * to_img,
1895 const string & cmp_name= "sqeuclidean", const Dict& cmp_params = Dict()) const;
1898 virtual EMData * align(EMData * this_img, EMData * to_img) const
1899 {
1900 return align(this_img, to_img, "sqeuclidean", Dict());
1901 }
1902
1903
1906 virtual vector<Dict> xform_align_nbest(EMData * this_img, EMData * to_img, const unsigned int nsoln, const string & cmp_name, const Dict& cmp_params) const;
1907
1908 virtual string get_name() const
1909 {
1910 return NAME;
1911 }
1912
1913 virtual string get_desc() const
1914 {
1915 return "3D rotational and translational alignment using a hierarchical approach in Fourier space. Should be very fast and not require 'refine' alignment. 'this' should be the fixed reference, aligned to symmetry axes and mask if provided. If masking, provide the mask rather than premasking the volume.";
1916 }
1917
1918 static Aligner *NEW()
1919 {
1920 return new RT3DTreeAligner();
1921 }
1922
1924 {
1925 TypeDict d;
1926 d.put("mask", EMObject::EMDATA,"A mask under which to do the alignment. Mask relative to 'this'");
1927 d.put("maxshift", EMObject::INT,"maximum shift allowed");
1928 d.put("sym", EMObject::STRING,"The symmtery to use as the basis of the spherical sampling. Default is c1 (no symmetry)");
1929 d.put("sigmathis", EMObject::FLOAT,"Only Fourier voxels larger than sigma times this value will be considered");
1930 d.put("sigmato", EMObject::FLOAT,"Only Fourier voxels larger than sigma times this value will be considered");
1931 d.put("maxres", EMObject::FLOAT,"maximum resolution to compare");
1932 d.put("minres", EMObject::FLOAT,"minimum resolution to compare");
1933 d.put("maxang", EMObject::FLOAT,"maximum angle from initial rotation.");
1934 d.put("initxform", EMObject::TRANSFORMARRAY,"An array of Transforms storing the starting positions.");
1935
1936// d.put("initxform", EMObject::TRANSFORM,"The Transform storing the starting position. If unspecified the identity matrix is used");
1937 d.put("randphi", EMObject::BOOL,"Ignore phi constraint for refine search");
1938 d.put("rand180", EMObject::BOOL,"Ignore 180 rotation for refine search");
1939 d.put("verbose", EMObject::BOOL,"Turn this on to have useful information printed to standard out.");
1940 return d;
1941 }
1942
1943 static const string NAME;
1944
1945 private:
1946 bool testort(EMData *small_this, EMData *small_to,vector<float> &sigmathisv,vector<float> &sigmatov, vector<float> &s_score, vector<float> &s_coverage,vector<Transform> &s_xform,int i,Dict &upd, Transform initxf, int maxshift,EMData *mask) const;
1947
1948 };
1949
1960 {
1961 public:
1964 virtual EMData * align(EMData * this_img, EMData * to_img,
1965 const string & cmp_name= "sqeuclidean", const Dict& cmp_params = Dict()) const;
1968 virtual EMData * align(EMData * this_img, EMData * to_img) const
1969 {
1970 return align(this_img, to_img, "sqeuclidean", Dict());
1971 }
1972
1973
1976 virtual vector<Dict> xform_align_nbest(EMData * this_img, EMData * to_img, const unsigned int nsoln, const string & cmp_name, const Dict& cmp_params) const;
1977
1978 virtual string get_name() const
1979 {
1980 return NAME;
1981 }
1982
1983 virtual string get_desc() const
1984 {
1985 return "EXPERIMENATAL - 3D rotational and translational alignment using a hierarchical approach in Fourier space. Should be very fast and not require 'refine' alignment. This variant performs a locally normalized CCF for translational alignment and should thus work better when the reference is masked, but will be slower.";
1986 }
1987
1988 static Aligner *NEW()
1989 {
1990 return new RT3DLocalTreeAligner();
1991 }
1992
1994 {
1995 TypeDict d;
1996 d.put("maxshift", EMObject::INT,"maximum shift allowed");
1997 d.put("sym", EMObject::STRING,"The symmtery to use as the basis of the spherical sampling. Default is c1 (no symmetry)");
1998 d.put("sigmathis", EMObject::FLOAT,"Only Fourier voxels larger than sigma times this value will be considered");
1999 d.put("sigmato", EMObject::FLOAT,"Only Fourier voxels larger than sigma times this value will be considered");
2000 d.put("maxres", EMObject::FLOAT,"maximum resolution to compare");
2001 d.put("minres", EMObject::FLOAT,"minimum resolution to compare");
2002 d.put("maxang", EMObject::FLOAT,"maximum angle from initial rotation.");
2003 d.put("initxform", EMObject::TRANSFORMARRAY,"An array of Transforms storing the starting positions.");
2004
2005// d.put("initxform", EMObject::TRANSFORM,"The Transform storing the starting position. If unspecified the identity matrix is used");
2006 d.put("randphi", EMObject::BOOL,"Ignore phi constraint for refine search");
2007 d.put("rand180", EMObject::BOOL,"Ignore 180 rotation for refine search");
2008 d.put("verbose", EMObject::BOOL,"Turn this on to have useful information printed to standard out.");
2009 return d;
2010 }
2011
2012 static const string NAME;
2013
2014 private:
2015 bool testort(EMData *small_this, EMData *small_to,EMData *small_mask,EMData *small_thissq,vector<float> &sigmathisv,vector<float> &sigmatov, vector<float> &s_score, vector<float> &s_coverage,vector<Transform> &s_xform,int i,Dict &upd, Transform initxf, int maxshift) const;
2016
2017 };
2018
2031 {
2032 public:
2035 virtual EMData * align(EMData * this_img, EMData * to_img,
2036 const string & cmp_name="ccc.tomo", const Dict& cmp_params = Dict()) const;
2039 virtual EMData * align(EMData * this_img, EMData * to_img) const
2040 {
2041 return align(this_img, to_img, "ccc.tomo", Dict());
2042 }
2043
2044
2047 virtual vector<Dict> xform_align_nbest(EMData * this_img, EMData * to_img, const unsigned int nsoln, const string & cmp_name, const Dict& cmp_params) const;
2048
2049 virtual string get_name() const
2050 {
2051 return NAME;
2052 }
2053
2054 virtual string get_desc() const
2055 {
2056 return "3D symmetry aligner";
2057 }
2058
2059 static Aligner *NEW()
2060 {
2061 return new RT3DSymmetryAligner();
2062 }
2063
2065 {
2066 TypeDict d;
2067 d.put("sym", EMObject::FLOAT,"The symmetry. Default is icos");
2068 d.put("transform", EMObject::TRANSFORM,"The transform to move to symmetry axis");
2069 d.put("verbose", EMObject::BOOL,"Turn this on to have useful information printed to standard out.");
2070 return d;
2071 }
2072
2073 static const string NAME;
2074 };
2075
2077 {
2078 public:
2079 virtual EMData * align(EMData * this_img, EMData * to_img,
2080 const string& cmp_name, const Dict& cmp_params=Dict()) const; //ming add ="frc"
2081
2082 virtual EMData * align(EMData * this_img, EMData * to_img) const
2083 {
2084 return align(this_img, to_img, "frc", Dict());
2085 }
2086
2087 string get_name() const
2088 {
2089 return NAME;
2090 }
2091
2092 string get_desc() const
2093 {
2094 return "FRM2D uses two rotational parameters and one translational parameter";
2095 }
2096
2097 static Aligner *NEW()
2098 {
2099 return new FRM2DAligner();
2100 }
2102 {
2103 TypeDict d;
2104 d.put("maxshift", EMObject::INT,"Maximum translation in pixels in any direction. If the solution yields a shift beyond this value in any direction, then the refinement is judged a failure and the original alignment is used as the solution.");
2105
2106 //d.put("p_max", EMObject::FLOAT,"p_max is");
2107 return d;
2108 }
2109
2110 static const string NAME;
2111 };
2112
2113
2115 {
2116 public:
2118
2119 void finish();
2120
2121 void setup(int nima, int nx, int ny, int ring_length, int nring, int ou, float step, int kx, int ky, bool ctf);
2122
2123 void insert_image(EMData *image, int num);
2124
2125 void filter_stack(vector<float> ctf_params);
2126
2127 void sum_oe(vector<float> ctf_params, vector<float> ali_params, EMData* ave1, EMData *ave2);
2128
2129 vector<float> alignment_2d(EMData *ref_image, vector<float> sx, vector<float> sy, int silent);
2130
2131 vector<float> ali2d_single_iter(EMData *ref_image, vector<float> ali_params, float csx, float csy, int silent, float delta);
2132
2133 private:
2135 float *ccf;
2137 bool CTF;
2138 float STEP;
2139 };
2140
2142 {
2143 public:
2145
2146 void finish();
2147
2148 void setup(int nima, int nref, int nx, int ny, int ring_length, int nring, int ou, float step, int kx, int ky, bool ctf);
2149
2150 void setup_params(vector<float> all_ali_params, vector<float> all_ctf_params);
2151
2152 void insert_image(EMData *image, int num);
2153
2154 void insert_ref_image(EMData *image, int num);
2155
2156 vector<float> multiref_ali2d(int silent);
2157
2158 private:
2160 float *ccf;
2163 bool CTF;
2164 float STEP;
2165 };
2166
2168
2169 void dump_aligners();
2170 map<string, vector<string> > dump_aligners_list();
2171}
2172
2173#endif
Aligner class defines image alignment method.
Definition: aligner.h:81
virtual vector< Dict > xform_align_nbest(EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const
This function first added in the context of the 3D aligners used by e2tomohunter: which wants the n b...
Definition: aligner.cpp:135
virtual void set_params(const Dict &new_params)
Set the Aligner parameters using a key/value dictionary.
Definition: aligner.h:120
virtual string get_desc() const =0
virtual EMData * align(EMData *this_img, EMData *to_img) const =0
virtual Dict get_params() const
Get the Aligner parameters in a key/value dictionary.
Definition: aligner.h:112
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name, const Dict &cmp_params) const =0
To align 'this_img' with another image passed in through its parameters.
virtual TypeDict get_param_types() const =0
virtual string get_name() const =0
Get the Aligner's name.
Dict params
Definition: aligner.h:147
void setup(int nima, int nx, int ny, int ring_length, int nring, int ou, float step, int kx, int ky, bool ctf)
vector< float > alignment_2d(EMData *ref_image, vector< float > sx, vector< float > sy, int silent)
float * image_stack_filtered
Definition: aligner.h:2134
void insert_image(EMData *image, int num)
vector< float > ali2d_single_iter(EMData *ref_image, vector< float > ali_params, float csx, float csy, int silent, float delta)
void filter_stack(vector< float > ctf_params)
void sum_oe(vector< float > ctf_params, vector< float > ali_params, EMData *ave1, EMData *ave2)
float * image_stack
Definition: aligner.h:2134
void insert_ref_image(EMData *image, int num)
void insert_image(EMData *image, int num)
vector< float > multiref_ali2d(int silent)
void setup(int nima, int nref, int nx, int ny, int ring_length, int nring, int ou, float step, int kx, int ky, bool ctf)
void setup_params(vector< float > all_ali_params, vector< float > all_ctf_params)
Cmp class defines image comparison method.
Definition: cmp.h:82
Dict is a dictionary to store <string, EMObject> pair.
Definition: emobject.h:385
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82
string get_name() const
Get the Aligner's name.
Definition: aligner.h:2087
string get_desc() const
Definition: aligner.h:2092
static const string NAME
Definition: aligner.h:2110
static Aligner * NEW()
Definition: aligner.h:2097
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name, const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual TypeDict get_param_types() const
Definition: aligner.h:2101
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:2082
Factory is used to store objects to create new instances.
Definition: emobject.h:725
2D rotational and translational alignment using a hierarchical method with gradually decreasing downs...
Definition: aligner.h:1763
virtual string get_desc() const
Definition: aligner.h:1786
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1781
static Aligner * NEW()
Definition: aligner.h:1791
virtual vector< Dict > xform_align_nbest(EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const
See Aligner comments for more details.
Definition: aligner.cpp:2731
virtual EMData * align(EMData *this_img, EMData *to_img) const
See Aligner comments for more details.
Definition: aligner.h:1771
static const string NAME
Definition: aligner.h:1809
virtual TypeDict get_param_types() const
Definition: aligner.h:1797
bool testort(EMData *small_this, EMData *small_to, vector< float > &sigmathisv, vector< float > &sigmatov, vector< float > &s_score, vector< float > &s_coverage, vector< Transform > &s_xform, int i, Dict &upd) const
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="sqeuclidean", const Dict &cmp_params=Dict()) const
See Aligner comments for more details.
Alignment of a 2D image into a 3D volume using a hierarchical method with gradually decreasing downsa...
Definition: aligner.h:1826
virtual EMData * align(EMData *this_img, EMData *to_img) const
See Aligner comments for more details.
Definition: aligner.h:1834
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="sqeuclidean", const Dict &cmp_params=Dict()) const
See Aligner comments for more details.
static Aligner * NEW()
Definition: aligner.h:1854
virtual string get_desc() const
Definition: aligner.h:1849
virtual vector< Dict > xform_align_nbest(EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const
See Aligner comments for more details.
Definition: aligner.cpp:2998
bool testort(EMData *small_this, EMData *small_to, vector< float > &s_score, vector< Transform > &s_xform, int i, Dict &upd, Transform initxf, int maxshift, int maxang) const
Definition: aligner.cpp:3339
static const string NAME
Definition: aligner.h:1874
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1844
virtual TypeDict get_param_types() const
Definition: aligner.h:1859
rotational and translational alignment using a square qrid of Altitude and Azimuth values (the phi ra...
Definition: aligner.h:1616
static Aligner * NEW()
Definition: aligner.h:1644
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1634
virtual TypeDict get_param_types() const
Definition: aligner.h:1649
virtual string get_desc() const
Definition: aligner.h:1639
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="ccc.tomo", const Dict &cmp_params=Dict()) const
See Aligner comments for more details.
virtual EMData * align(EMData *this_img, EMData *to_img) const
See Aligner comments for more details.
Definition: aligner.h:1624
virtual vector< Dict > xform_align_nbest(EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const
See Aligner comments for more details.
Definition: aligner.cpp:2553
static const string NAME
Definition: aligner.h:1671
3D rotational and translational alignment using a hierarchical method with gradually decreasing downs...
Definition: aligner.h:1960
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1978
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="sqeuclidean", const Dict &cmp_params=Dict()) const
See Aligner comments for more details.
static Aligner * NEW()
Definition: aligner.h:1988
virtual vector< Dict > xform_align_nbest(EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const
See Aligner comments for more details.
Definition: aligner.cpp:3908
virtual EMData * align(EMData *this_img, EMData *to_img) const
See Aligner comments for more details.
Definition: aligner.h:1968
virtual string get_desc() const
Definition: aligner.h:1983
static const string NAME
Definition: aligner.h:2012
virtual TypeDict get_param_types() const
Definition: aligner.h:1993
bool testort(EMData *small_this, EMData *small_to, EMData *small_mask, EMData *small_thissq, vector< float > &sigmathisv, vector< float > &sigmatov, vector< float > &s_score, vector< float > &s_coverage, vector< Transform > &s_xform, int i, Dict &upd, Transform initxf, int maxshift) const
Definition: aligner.cpp:4296
3D rotational and translational alignment using spherical sampling, can reduce the search space based...
Definition: aligner.h:1700
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="sqeuclidean", const Dict &cmp_params=Dict()) const
See Aligner comments for more details.
static Aligner * NEW()
Definition: aligner.h:1728
static const string NAME
Definition: aligner.h:1753
virtual EMData * align(EMData *this_img, EMData *to_img) const
See Aligner comments for more details.
Definition: aligner.h:1708
virtual TypeDict get_param_types() const
Definition: aligner.h:1733
virtual vector< Dict > xform_align_nbest(EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const
See Aligner comments for more details.
Definition: aligner.cpp:4394
virtual string get_desc() const
Definition: aligner.h:1723
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1718
3D rotational symmetry aligner.
Definition: aligner.h:2031
virtual TypeDict get_param_types() const
Definition: aligner.h:2064
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="ccc.tomo", const Dict &cmp_params=Dict()) const
See Aligner comments for more details.
virtual string get_desc() const
Definition: aligner.h:2054
static const string NAME
Definition: aligner.h:2073
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:2049
virtual vector< Dict > xform_align_nbest(EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const
See Aligner comments for more details.
Definition: aligner.cpp:4592
virtual EMData * align(EMData *this_img, EMData *to_img) const
See Aligner comments for more details.
Definition: aligner.h:2039
static Aligner * NEW()
Definition: aligner.h:2059
3D rotational and translational alignment using a hierarchical method with gradually decreasing downs...
Definition: aligner.h:1890
virtual EMData * align(EMData *this_img, EMData *to_img) const
See Aligner comments for more details.
Definition: aligner.h:1898
static const string NAME
Definition: aligner.h:1943
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="sqeuclidean", const Dict &cmp_params=Dict()) const
See Aligner comments for more details.
virtual string get_desc() const
Definition: aligner.h:1913
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1908
virtual TypeDict get_param_types() const
Definition: aligner.h:1923
virtual vector< Dict > xform_align_nbest(EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const
See Aligner comments for more details.
Definition: aligner.cpp:3423
bool testort(EMData *small_this, EMData *small_to, vector< float > &sigmathisv, vector< float > &sigmatov, vector< float > &s_score, vector< float > &s_coverage, vector< Transform > &s_xform, int i, Dict &upd, Transform initxf, int maxshift, EMData *mask) const
Definition: aligner.cpp:3809
static Aligner * NEW()
Definition: aligner.h:1918
rotational, translational and flip alignment using real-space methods.
Definition: aligner.h:1174
static Aligner * NEW()
Definition: aligner.h:1193
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1183
static const string NAME
Definition: aligner.h:1207
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual string get_desc() const
Definition: aligner.h:1188
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1178
virtual TypeDict get_param_types() const
Definition: aligner.h:1198
rotational, translational and flip alignment using exhaustive search.
Definition: aligner.h:1218
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name, const Dict &cmp_params) const
To align 'this_img' with another image passed in through its parameters.
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1222
virtual string get_desc() const
Definition: aligner.h:1231
virtual TypeDict get_param_types() const
Definition: aligner.h:1241
static Aligner * NEW()
Definition: aligner.h:1236
static const string NAME
Definition: aligner.h:1251
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1226
Refine alignment.
Definition: aligner.h:1482
static Aligner * NEW()
Definition: aligner.h:1502
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="sqeuclidean", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static const string NAME
Definition: aligner.h:1522
virtual TypeDict get_param_types() const
Definition: aligner.h:1507
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1487
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1492
virtual string get_desc() const
Definition: aligner.h:1497
virtual TypeDict get_param_types() const
Definition: aligner.h:1572
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1557
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="sqeuclidean", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1552
virtual string get_desc() const
Definition: aligner.h:1562
static Aligner * NEW()
Definition: aligner.h:1567
static const string NAME
Definition: aligner.h:1589
Conjugate gradient refine alignment.
Definition: aligner.h:1370
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1380
virtual string get_desc() const
Definition: aligner.h:1385
static const string NAME
Definition: aligner.h:1411
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1375
static Aligner * NEW()
Definition: aligner.h:1390
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual TypeDict get_param_types() const
Definition: aligner.h:1395
refine alignment.
Definition: aligner.h:1313
virtual TypeDict get_param_types() const
Definition: aligner.h:1338
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1323
static const string NAME
Definition: aligner.h:1356
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static Aligner * NEW()
Definition: aligner.h:1333
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1318
virtual string get_desc() const
Definition: aligner.h:1328
rotational and flip alignment, iterative style
Definition: aligner.h:856
virtual string get_desc() const
Definition: aligner.h:869
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:860
static TypeDict static_get_param_types()
Definition: aligner.h:884
static const string NAME
Definition: aligner.h:891
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static Aligner * NEW()
Definition: aligner.h:874
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:864
virtual TypeDict get_param_types() const
Definition: aligner.h:879
rotational and flip alignment
Definition: aligner.h:810
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:814
virtual string get_desc() const
Definition: aligner.h:823
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static const string NAME
Definition: aligner.h:846
static TypeDict static_get_param_types()
Definition: aligner.h:838
virtual TypeDict get_param_types() const
Definition: aligner.h:833
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:818
static Aligner * NEW()
Definition: aligner.h:828
rotational alignment assuming centers are correct
Definition: aligner.h:411
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:416
virtual string get_desc() const
Definition: aligner.h:426
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:421
static Aligner * NEW()
Definition: aligner.h:431
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static const string NAME
Definition: aligner.h:442
virtual TypeDict get_param_types() const
Definition: aligner.h:436
rotational, translational alignment
Definition: aligner.h:498
virtual TypeDict get_param_types() const
Definition: aligner.h:523
virtual string get_desc() const
Definition: aligner.h:513
static const string NAME
Definition: aligner.h:539
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:503
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:508
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
Iterative rotational, translational alignment.
Definition: aligner.h:612
virtual string get_desc() const
Definition: aligner.h:627
virtual TypeDict get_param_types() const
Definition: aligner.h:637
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:622
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:617
Rotational, translational alignment by resampling to polar coordinates.
Definition: aligner.h:724
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:729
static Aligner * NEW()
Definition: aligner.h:744
virtual TypeDict get_param_types() const
Definition: aligner.h:749
static const string NAME
Definition: aligner.h:760
virtual string get_desc() const
Definition: aligner.h:739
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:734
rotational, translational alignment
Definition: aligner.h:452
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static const string NAME
Definition: aligner.h:489
virtual string get_desc() const
Definition: aligner.h:467
static Aligner * NEW()
Definition: aligner.h:472
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:462
virtual TypeDict get_param_types() const
Definition: aligner.h:477
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:457
rotational, translational alignment
Definition: aligner.h:768
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual string get_desc() const
Definition: aligner.h:783
static Aligner * NEW()
Definition: aligner.h:788
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:773
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:778
virtual TypeDict get_param_types() const
Definition: aligner.h:793
static const string NAME
Definition: aligner.h:801
rotational, translational and flip alignment, iterative style
Definition: aligner.h:1017
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1026
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1021
virtual TypeDict get_param_types() const
Definition: aligner.h:1041
Rotational, translational alignment by resampling to polar coordinates.
Definition: aligner.h:1130
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1135
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1140
virtual TypeDict get_param_types() const
Definition: aligner.h:1155
virtual string get_desc() const
Definition: aligner.h:1145
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
rotational, translational and flip alignment
Definition: aligner.h:901
virtual string get_desc() const
Definition: aligner.h:915
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:905
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:910
static const string NAME
Definition: aligner.h:944
virtual TypeDict get_param_types() const
Definition: aligner.h:925
static TypeDict static_get_param_types()
Definition: aligner.h:930
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static Aligner * NEW()
Definition: aligner.h:920
Iterative rotational, translational alignment with flipping and scaling.
Definition: aligner.h:1073
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1088
virtual TypeDict get_param_types() const
Definition: aligner.h:1103
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1083
rotational, translational, flip, scaling alignment
Definition: aligner.h:959
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:969
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:974
virtual TypeDict get_param_types() const
Definition: aligner.h:989
virtual string get_desc() const
Definition: aligner.h:979
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
Iterative rotational, translational alignment with scaling.
Definition: aligner.h:666
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual TypeDict get_param_types() const
Definition: aligner.h:696
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:676
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:681
rotational, translational, scaling alignment
Definition: aligner.h:553
virtual TypeDict get_param_types() const
Definition: aligner.h:584
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:564
static const string NAME
Definition: aligner.h:598
virtual string get_desc() const
Definition: aligner.h:574
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static Aligner * NEW()
Definition: aligner.h:579
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:569
rotational alignment using invariants
Definition: aligner.h:325
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:330
virtual string get_desc() const
Definition: aligner.h:340
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:335
static Aligner * NEW()
Definition: aligner.h:345
static const string NAME
Definition: aligner.h:360
virtual TypeDict get_param_types() const
Definition: aligner.h:350
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
rotational alignment using the iterative method (in this case we only do one iteration b/c we are not...
Definition: aligner.h:372
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:382
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:377
virtual string get_desc() const
Definition: aligner.h:387
static const string NAME
Definition: aligner.h:405
static Aligner * NEW()
Definition: aligner.h:392
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual TypeDict get_param_types() const
Definition: aligner.h:397
rotational alignment using angular correlation
Definition: aligner.h:282
virtual TypeDict get_param_types() const
Definition: aligner.h:309
static Aligner * NEW()
Definition: aligner.h:302
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:292
static const string NAME
Definition: aligner.h:319
static EMData * align_180_ambiguous(EMData *this_img, EMData *to_img, int rfp_mode=2, int zscore=0)
Definition: aligner.cpp:446
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:287
virtual string get_desc() const
Definition: aligner.h:297
This is an ABS for use in constructing, rt_scale, rt_flip, etc scale aligners.
Definition: aligner.h:167
EMData * align_using_base(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
implmentation of the scale alignment using the base aligner set in set_base_aligner
Definition: aligner.cpp:141
ScaleAlignerABS(const string &ba)
Constructor to initialize the basealigner string.
Definition: aligner.h:170
const string basealigner
Definition: aligner.h:179
Scale aligner.
Definition: aligner.h:192
virtual string get_desc() const
Definition: aligner.h:207
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:197
virtual TypeDict get_param_types() const
Definition: aligner.h:217
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:202
static const string NAME
Definition: aligner.h:226
static Aligner * NEW()
Definition: aligner.h:212
Aligns a particle with a specified symetry to its symmetry axis using the simplex multidimensional mi...
Definition: aligner.h:1421
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1431
virtual TypeDict get_param_types() const
Definition: aligner.h:1443
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="ccc", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static const string NAME
Definition: aligner.h:1460
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1426
static Aligner * NEW()
Definition: aligner.h:1435
string get_desc() const
Definition: aligner.h:1439
Aligns a particle with the specified symmetry into the standard orientation for that symmetry.
Definition: aligner.h:1262
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:1266
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="ccc", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static Aligner * NEW()
Definition: aligner.h:1275
virtual TypeDict get_param_types() const
Definition: aligner.h:1280
virtual string get_desc() const
Definition: aligner.h:1292
static const string NAME
Definition: aligner.h:1297
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:1270
A Transform object is a somewhat specialized object designed specifically for EMAN2/Sparx storage of ...
Definition: transform.h:75
Translational 2D Alignment using cross correlation.
Definition: aligner.h:238
virtual string get_name() const
Get the Aligner's name.
Definition: aligner.h:248
virtual EMData * align(EMData *this_img, EMData *to_img) const
Definition: aligner.h:243
static const string NAME
Definition: aligner.h:274
virtual TypeDict get_param_types() const
Definition: aligner.h:263
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.
static Aligner * NEW()
Definition: aligner.h:258
virtual string get_desc() const
Definition: aligner.h:253
TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.
Definition: emobject.h:305
void put(const string &key, EMObject::ObjectType o, const string &desc="")
Definition: emobject.h:330
E2Exception class.
Definition: aligner.h:40
void dump_aligners()
Definition: aligner.cpp:5436
map< string, vector< string > > dump_aligners_list()
Definition: aligner.cpp:5441