EMAN2
cmp.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_cmp__h__
33#define eman_cmp__h__ 1
34
35
36#include "emobject.h"
37
38namespace EMAN
39{
40
41 class EMData;
81 class Cmp
82 {
83 public:
84 virtual ~ Cmp()
85 {
86 }
87
96 virtual float cmp(EMData * image, EMData * with) const = 0;
97
101 virtual string get_name() const = 0;
102
103 virtual string get_desc() const = 0;
104
108 virtual Dict get_params() const
109 {
110 return params;
111 }
112
116 virtual void set_params(const Dict & new_params)
117 {
118 params = new_params;
119 }
120
127 virtual TypeDict get_param_types() const = 0;
128
129 protected:
130 void validate_input_args(const EMData * image, const EMData *with) const;
131
132 mutable Dict params;
133 };
134
152 class CccCmp:public Cmp
153 {
154 public:
155 float cmp(EMData * image, EMData * with) const;
156
157 string get_name() const
158 {
159 return NAME;
160 }
161
162 string get_desc() const
163 {
164 return "Cross-correlation coefficient (default -1 * ccc)";
165 }
166
167 static Cmp *NEW()
168 {
169 return new CccCmp();
170 }
171
172 //param mask Image mask
174 {
175 TypeDict d;
176 d.put("negative", EMObject::INT, "If set, returns -1 * ccc product. Set by default so smaller is better");
177 d.put("mask", EMObject::EMDATA, "image mask");
178 return d;
179 }
180
181 static const string NAME;
182 };
183
184
185 /* Compues the L^1 difference, after normalization.*/
186 class LodCmp:public Cmp
187 {
188 public:
189 float cmp(EMData * image, EMData * with) const;
190
191 string get_name() const
192 {
193 return NAME;
194 }
195
196 string get_desc() const
197 {
198 return "L^1 normalized difference (positive by default)";
199 }
200
201 static Cmp *NEW()
202 {
203 return new LodCmp();
204 }
205
206 //param mask Image mask
208 {
209 TypeDict d;
210 d.put("negative", EMObject::INT, "If set (which is the default), returns Lod. (The smaller the better)");
211 d.put("normalize", EMObject::INT, "If set, normalizes maps prior to computing the difference. Default=0 (no normalization)");
212 d.put("mask", EMObject::EMDATA, "image mask");
213 return d;
214 }
215
216 static const string NAME;
217 };
218
219
221 // I corrected this as there is no such thing as "variance between two images"
222 // I corrected naive coding to avoid square
223 // Also, the equation in return statement was incorrect, grrrr!!!
224 // Finally, I added mask option PAP 04/23/06
225 class SqEuclideanCmp:public Cmp
226 {
227 public:
229
230 float cmp(EMData * image, EMData * with) const;
231
232 string get_name() const
233 {
234 return NAME;
235 }
236
237 string get_desc() const
238 {
239 return "Squared Euclidean distance (sum(a - b)^2)/n.";
240 }
241
242 static Cmp *NEW()
243 {
244 return new SqEuclideanCmp();
245 }
246
248 {
249 TypeDict d;
250 d.put("mask", EMObject::EMDATA, "image mask");
251 d.put("zeromask", EMObject::INT, "If set, zero pixels in either image will be excluded from the statistics");
252 d.put("normto",EMObject::INT,"If set, 'with' is normalized to 'this' before computing the distance");
253 return d;
254 }
255
256 static const string NAME;
257 };
258
259
268 class DotCmp:public Cmp
269 {
270 public:
271 float cmp(EMData * image, EMData * with) const;
272
273 string get_name() const
274 {
275 return NAME;
276 }
277
278 string get_desc() const
279 {
280 return "Dot product (default -1 * dot product)";
281 }
282
283 static Cmp *NEW()
284 {
285 return new DotCmp();
286 }
287
289 {
290 TypeDict d;
291 d.put("negative", EMObject::INT, "If set, returns -1 * dot product. Set by default so smaller is better");
292 d.put("normalize", EMObject::INT, "If set, returns normalized dot product (cosine of the angle) -1.0 - 1.0.");
293 d.put("mask", EMObject::EMDATA, "image mask");
294 return d;
295 }
296
297 static const string NAME;
298 };
299
313 class TomoCccCmp:public Cmp
314 {
315 public:
316 virtual float cmp(EMData * image, EMData * with) const;
317
318 virtual string get_name() const
319 {
320 return NAME;
321 }
322
323 virtual string get_desc() const
324 {
325 return "Ccc with consideration given for the missing wedge";
326 }
327
328 static Cmp *NEW()
329 {
330 return new TomoCccCmp();
331 }
332
334 {
335 TypeDict d;
336 d.put("norm", EMObject::BOOL,"Whether the cross correlation image should be normalized (should be for normalized images). Default is true.");
337 d.put("ccf", EMObject::EMDATA,"The ccf image, can be provided if it already exists to avoid recalculating it");
338 d.put("normalize", EMObject::EMDATA,"Return the negative value (which is EMAN2 convention), Defalut is true(1)");
339 d.put("searchx", EMObject::INT, "The maximum range of the peak location in the x direction. Default is sizex/4");
340 d.put("searchy", EMObject::INT, "The maximum range of the peak location in the y direction. Default is sizey/4");
341 d.put("searchz", EMObject::INT, "The maximum range of the peak location in the z direction. Default is sizez/4");
342 return d;
343 }
344
345 static const string NAME;
346 };
347
352 class TomoWedgeCccCmp:public Cmp
353 {
354 public:
355 virtual float cmp(EMData * image, EMData * with) const;
356
357 virtual string get_name() const
358 {
359 return NAME;
360 }
361
362 virtual string get_desc() const
363 {
364 return "Ccc of two FFTs with missing wedge taken into account explicitly. Also stores overlap as 'fft_overlap' in \
365first input image. Individual voxels are include only if they exceed the threshold value in both images. fft_overlap expresses \
366the fractional number of voxels included in the comparison. Actual returned correlations already account for this effect, but \
367the overlap can be used to estimate the relative uncertainty in the resulting correlation coefficient.";
368 }
369
370 static Cmp *NEW()
371 {
372 return new TomoWedgeCccCmp();
373 }
374
376 {
377 TypeDict d;
378// d.put("norm", EMObject::BOOL,"Whether the cross correlation image should be normalized (should be for normalized images). Default is true.");
379// d.put("ccf", EMObject::EMDATA,"The ccf image, can be provided if it already exists to avoid recalculating it");
380 d.put("sigmaimg", EMObject::FLOAT, "Sigma coefficient for thresholding values included in the dot product. default = 0.5");
381 d.put("sigmawith", EMObject::FLOAT, "Sigma coefficient for thresholding values included in the dot product in the 'with' image. Default = 0.5");
382 d.put("negative", EMObject::INT, "If set, returns -1 * ccc product. Set by default so smaller is better");
383 return d;
384 }
385
386 static const string NAME;
387 };
388
393 class TomoWedgeFscCmp:public Cmp
394 {
395 public:
396 virtual float cmp(EMData * image, EMData * with) const;
397
398 virtual string get_name() const
399 {
400 return NAME;
401 }
402
403 virtual string get_desc() const
404 {
405 return "FSC of two FFTs with missing wedge taken into account via a dynamic threshold. Also stores overlap as 'fft_overlap' in \
406first input image on return. This comparator can take the missing wedge into account automatically without any precomputation of wedge \
407orientation. If sigmaimg and/or sigmawith are provided, they must contain floating point arrays with at least as many elements as the \
408Fourier radius in pixels, and these curves represent the thresholds for each image for including the values in the FSC, or considering them \
409to be missing values. If not provided, these values will be computed automatically. These options are primarily provided for speed.";
410 }
411
412 static Cmp *NEW()
413 {
414 return new TomoWedgeFscCmp();
415 }
416
418 {
419 TypeDict d;
420// d.put("norm", EMObject::BOOL,"Whether the cross correlation image should be normalized (should be for normalized images). Default is true.");
421// d.put("ccf", EMObject::EMDATA,"The ccf image, can be provided if it already exists to avoid recalculating it");
422 d.put("sigmaimg", EMObject::FLOATARRAY, "Res dependent amplitude threshold. If provided this must contain a floating point array with as many elements as the Fourier radius of the image. ");
423 d.put("sigmawith", EMObject::FLOATARRAY, "Resolution dependent coefficient for thresholding values included in the dot product in the 'with' image. Default = 0.1 and is normally fine");
424 d.put("sigmaimgval", EMObject::FLOAT, "Sigma coefficient for thresholding values included in the dot product. default = 0.5");
425 d.put("sigmawithval", EMObject::FLOAT, "Sigma coefficient for thresholding values included in the dot product in the 'with' image. Default = 0.5");
426 d.put("minres", EMObject::FLOAT, "The minimum resolution to accept (1/A) Default is 3 pixels. overwrites pmin");
427 d.put("maxres", EMObject::FLOAT, "The maximum resolution to accept (1/A) Default is axial Nyquist. overwrites pmax");
428 d.put("pmin", EMObject::INT, "The minimum resolution in pixels.");
429 d.put("pmax", EMObject::INT, "The maximum resolution in pixels.");
430 d.put("retcurve", EMObject::BOOL, "Return fsc curve in image header");
431 return d;
432 }
433
434 static const string NAME;
435 };
436
437
447 class TomoFscCmp:public Cmp
448 {
449 public:
450 virtual float cmp(EMData * image, EMData * with) const;
451
452 virtual string get_name() const
453 {
454 return NAME;
455 }
456
457 virtual string get_desc() const
458 {
459 return "EXPERIMENTAL - Fsc with consideration given for the missing wedge. Not ready for routine use.";
460 }
461
462 static Cmp *NEW()
463 {
464 return new TomoFscCmp();
465 }
466
468 {
469 TypeDict d;
470 d.put("normalize", EMObject::EMDATA,"Return the negative value (which is EMAN2 convention), Defalut is true(1)");
471 d.put("sigmas", EMObject::FLOAT, "The number of times the standard deviation of Fourier amplitudes to accept");
472 d.put("minres", EMObject::FLOAT, "The minimum resolution to accept (1/A) Default is inf");
473 d.put("maxres", EMObject::FLOAT, "The maximum resolution to accept (1/A) Default=0.0");
474 d.put("apix", EMObject::FLOAT, "The angstroms per pixel to use. Default = apix_x(1.0 if not present)");
475 return d;
476 }
477
478 static const string NAME;
479 };
480
488 class QuadMinDotCmp:public Cmp
489 {
490 public:
491 float cmp(EMData * image, EMData * with) const;
492
493 string get_name() const
494 {
495 return NAME;
496 }
497
498 string get_desc() const
499 {
500 return "Calculates dot product for each quadrant and returns worst value (default -1 * dot product)";
501 }
502
503 static Cmp *NEW()
504 {
505 return new QuadMinDotCmp();
506 }
507
509 {
510 TypeDict d;
511 d.put("negative", EMObject::INT, "If set, returns -1 * dot product. Default = true (smaller is better)");
512 d.put("normalize", EMObject::INT, "If set, returns normalized dot product -1.0 - 1.0.");
513 return d;
514 }
515
516 static const string NAME;
517 };
518
524 class OptSubCmp:public Cmp
525 {
526 public:
528
529 float cmp(EMData * image, EMData * with) const;
530
531 string get_name() const
532 {
533 return NAME;
534 }
535
536 string get_desc() const
537 {
538 return "Residual power left in the image after optimally subtracting the reference with math.sub.optimal. Smaller values indicate a closer match.";
539 }
540
541 static Cmp *NEW()
542 {
543 return new OptSubCmp();
544 }
545
547 {
548 TypeDict d;
549 d.put("minres", EMObject::FLOAT, "Lowest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=200");
550 d.put("maxres", EMObject::FLOAT, "Highest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=10");
551 d.put("zeromask", EMObject::BOOL, "Treat zero regions in 'with' as a mask");
552 d.put("ctfweight", EMObject::BOOL, "Weight frequencies using CTF");
553// d.put("swap", EMObject::BOOL, "Swaps the identity of this and with, since A->B comparisons are not equivalent to B->A");
554 d.put("mask", EMObject::EMDATA, "Real space mask. Only computes the residual power under the mask. Significant speed penalty if specified. Default=None.");
555 return d;
556 }
557
558 static const string NAME;
559
560 };
561
562
575 class OptVarianceCmp:public Cmp
576 {
577 public:
579
580 float cmp(EMData * image, EMData * with) const;
581
582 string get_name() const
583 {
584 return NAME;
585 }
586
587 string get_desc() const
588 {
589 return "Real-space variance after density optimization, self should be noisy and target less noisy. Linear transform applied to density to minimize variance.";
590 }
591
592 static Cmp *NEW()
593 {
594 return new OptVarianceCmp();
595 }
596
598 {
599 TypeDict d;
600 d.put("invert", EMObject::INT, "If set, 'with' is rescaled rather than 'this'. 'this' should still be the noisier image. (default=0)");
601 d.put("keepzero", EMObject::INT, "If set, zero pixels will not be adjusted in the linear density optimization. (default=1)");
602 d.put("matchfilt", EMObject::INT, "If set, with will be filtered so its radial power spectrum matches 'this' before density optimization of this. (default=1)");
603 d.put("matchamp", EMObject::INT, "Takes per-pixel Fourier amplitudes from self and imposes them on the target, but leaves the phases alone. (default=0)");
604 d.put("radweight", EMObject::INT, "Upweight variances closer to the edge of the image. (default=0)");
605 d.put("debug", EMObject::INT, "Performs various debugging actions if set.");
606 return d;
607 }
608
609 float get_scale() const
610 {
611 return scale;
612 }
613
614 float get_shift() const
615 {
616 return shift;
617 }
618
619 static const string NAME;
620
621 private:
622 mutable float scale;
623 mutable float shift;
624 };
625
636 class PhaseCmp:public Cmp
637 {
638 public:
639 float cmp(EMData * image, EMData * with) const;
640
641 string get_name() const
642 {
643 return NAME;
644 }
645
646 string get_desc() const
647 {
648 return "Mean phase difference";
649 }
650
651 static Cmp *NEW()
652 {
653 return new PhaseCmp();
654 }
655
657 {
658 TypeDict d;
659 d.put("snrweight", EMObject::INT, "If set, the SNR of 'this' will be used to weight the result. If 'this' lacks CTF info, it will check 'with'. (default=0)");
660 d.put("snrfn", EMObject::INT, "If nonzero, an empirical function will be used as a radial weight rather than the true SNR. (1 - exp decay)'. (default=0)");
661 d.put("ampweight", EMObject::INT, "If set, the amplitude of 'with' will be used as a weight in the averaging'. (default=0)");
662 d.put("zeromask", EMObject::INT, "Treat regions in either image that are zero as a mask");
663 d.put("minres", EMObject::FLOAT, "Lowest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=500");
664 d.put("maxres", EMObject::FLOAT, "Highest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=10");
665 return d;
666 }
667
668 static const string NAME;
669
670//#ifdef EMAN2_USING_CUDA
671// float cuda_cmp(EMData * image, EMData *with) const;
672//#endif //EMAN2_USING_CUDA
673 };
674
681 class FRCCmp:public Cmp
682 {
683 public:
684 float cmp(EMData * image, EMData * with) const;
685
686 string get_name() const
687 {
688 return NAME;
689 }
690
691 string get_desc() const
692 {
693 return "Computes the mean Fourier Ring Correlation between the image and reference (with optional weighting factors).";
694 }
695
696 static Cmp *NEW()
697 {
698 return new FRCCmp();
699 }
700
702 {
703 TypeDict d;
704 d.put("snrweight", EMObject::INT, "If set, the SNR of 'this' will be used to weight the result. If 'this' lacks CTF info, it will check 'with'. (default=0)");
705 d.put("ampweight", EMObject::INT, "If set, the amplitude of 'this' will be used to weight the result (default=0)");
706 d.put("sweight", EMObject::INT, "If set, weight the (1-D) average by the number of pixels in each ring (default=1)");
707 d.put("nweight", EMObject::INT, "Downweight similarity based on number of particles in reference (default=0)");
708 d.put("zeromask", EMObject::INT, "Treat regions in either image that are zero as a mask (default=0)");
709 d.put("minres", EMObject::FLOAT, "Lowest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=500");
710 d.put("maxres", EMObject::FLOAT, "Highest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=10");
711 d.put("pmin", EMObject::FLOAT, "The minimum resolution in pixels.");
712 d.put("pmax", EMObject::FLOAT, "The maximum resolution in pixels.");
713 return d;
714 }
715
716 static const string NAME;
717 };
718
719
720
723 class VerticalCmp:public Cmp
724 {
725 public:
726 float cmp(EMData * image, EMData * with) const;
727
728 string get_name() const
729 {
730 return NAME;
731 }
732
733 string get_desc() const
734 {
735 return "Align the 2d image vertically. Reference image is ignored";
736 }
737
738 static Cmp *NEW()
739 {
740 return new VerticalCmp();
741 }
742
744 {
745 TypeDict d;
746 return d;
747 }
748
749 static const string NAME;
750 };
751
752
753
754
756
757 void dump_cmps();
758 map<string, vector<string> > dump_cmps_list();
759}
760
761
762#endif
Compute the cross-correlation coefficient between two images.
Definition: cmp.h:153
string get_desc() const
Definition: cmp.h:162
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:113
static const string NAME
Definition: cmp.h:181
string get_name() const
Get the Cmp's name.
Definition: cmp.h:157
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:173
static Cmp * NEW()
Definition: cmp.h:167
Cmp class defines image comparison method.
Definition: cmp.h:82
virtual TypeDict get_param_types() const =0
Get Cmp parameter information in a dictionary.
virtual string get_desc() const =0
virtual float cmp(EMData *image, EMData *with) const =0
To compare 'image' with another image passed in through its parameters.
virtual string get_name() const =0
Get the Cmp's name.
virtual Dict get_params() const
Get the Cmp parameters in a key/value dictionary.
Definition: cmp.h:108
void validate_input_args(const EMData *image, const EMData *with) const
Definition: cmp.cpp:81
virtual void set_params(const Dict &new_params)
Set the Cmp parameters using a key/value dictionary.
Definition: cmp.h:116
Dict params
Definition: cmp.h:132
Dict is a dictionary to store <string, EMObject> pair.
Definition: emobject.h:385
Use dot product of 2 same-size images to do the comparison.
Definition: cmp.h:269
static Cmp * NEW()
Definition: cmp.h:283
string get_name() const
Get the Cmp's name.
Definition: cmp.h:273
static const string NAME
Definition: cmp.h:297
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:288
string get_desc() const
Definition: cmp.h:278
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:417
EMData stores an image's data and defines core image processing routines.
Definition: emdata.h:82
FRCCmp returns a quality factor based on FRC between images.
Definition: cmp.h:682
string get_name() const
Get the Cmp's name.
Definition: cmp.h:686
static Cmp * NEW()
Definition: cmp.h:696
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:1417
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:701
static const string NAME
Definition: cmp.h:716
string get_desc() const
Definition: cmp.h:691
Factory is used to store objects to create new instances.
Definition: emobject.h:725
static Cmp * NEW()
Definition: cmp.h:201
static const string NAME
Definition: cmp.h:216
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:207
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:189
string get_name() const
Get the Cmp's name.
Definition: cmp.h:191
string get_desc() const
Definition: cmp.h:196
Uses math.sub.optimal to remove the density of the reference from the image as much as possible.
Definition: cmp.h:525
string get_desc() const
Definition: cmp.h:536
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:1575
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:546
static const string NAME
Definition: cmp.h:558
string get_name() const
Get the Cmp's name.
Definition: cmp.h:531
static Cmp * NEW()
Definition: cmp.h:541
Variance between two data sets after various modifications.
Definition: cmp.h:576
float get_scale() const
Definition: cmp.h:609
static Cmp * NEW()
Definition: cmp.h:592
string get_name() const
Get the Cmp's name.
Definition: cmp.h:582
float get_shift() const
Definition: cmp.h:614
string get_desc() const
Definition: cmp.h:587
static const string NAME
Definition: cmp.h:619
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:1036
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:597
Amplitude weighted mean phase difference (radians) with optional SNR weight.
Definition: cmp.h:637
static Cmp * NEW()
Definition: cmp.h:651
static const string NAME
Definition: cmp.h:668
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:656
string get_name() const
Get the Cmp's name.
Definition: cmp.h:641
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:1222
string get_desc() const
Definition: cmp.h:646
This will calculate the dot product for each quadrant of the image and return the worst value.
Definition: cmp.h:489
string get_desc() const
Definition: cmp.h:498
string get_name() const
Get the Cmp's name.
Definition: cmp.h:493
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:988
static const string NAME
Definition: cmp.h:516
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:508
static Cmp * NEW()
Definition: cmp.h:503
Squared Euclidean distance normalized by n between 'this' and 'with'.
Definition: cmp.h:226
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:247
static const string NAME
Definition: cmp.h:256
string get_desc() const
Definition: cmp.h:237
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:280
static Cmp * NEW()
Definition: cmp.h:242
string get_name() const
Get the Cmp's name.
Definition: cmp.h:232
This implements the technique of Mike Schmid where by the cross correlation is normalized in an effor...
Definition: cmp.h:314
virtual float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:643
static Cmp * NEW()
Definition: cmp.h:328
static const string NAME
Definition: cmp.h:345
virtual string get_desc() const
Definition: cmp.h:323
virtual string get_name() const
Get the Cmp's name.
Definition: cmp.h:318
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:333
This is a FSC comparitor for tomography.
Definition: cmp.h:448
static Cmp * NEW()
Definition: cmp.h:462
static const string NAME
Definition: cmp.h:478
virtual string get_desc() const
Definition: cmp.h:457
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:467
virtual string get_name() const
Get the Cmp's name.
Definition: cmp.h:452
virtual float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:856
Both images should be FFTs.
Definition: cmp.h:353
virtual float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:691
virtual string get_name() const
Get the Cmp's name.
Definition: cmp.h:357
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:375
static Cmp * NEW()
Definition: cmp.h:370
static const string NAME
Definition: cmp.h:386
virtual string get_desc() const
Definition: cmp.h:362
Both images should be FFTs.
Definition: cmp.h:394
static Cmp * NEW()
Definition: cmp.h:412
virtual string get_desc() const
Definition: cmp.h:403
static const string NAME
Definition: cmp.h:434
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:417
virtual string get_name() const
Get the Cmp's name.
Definition: cmp.h:398
virtual float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:748
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
string get_desc() const
Definition: cmp.h:733
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Definition: cmp.cpp:1642
static const string NAME
Definition: cmp.h:749
static Cmp * NEW()
Definition: cmp.h:738
string get_name() const
Get the Cmp's name.
Definition: cmp.h:728
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Definition: cmp.h:743
E2Exception class.
Definition: aligner.h:40
void dump_cmps()
Definition: cmp.cpp:1664
map< string, vector< string > > dump_cmps_list()
Definition: cmp.cpp:1669