32#ifndef eman_analyzer_h__
33#define eman_analyzer_h__
36#include <gsl/gsl_linalg.h>
134 if (
images.size()>1) { printf(
"InertiaMatrixAnalyzer takes only a single image\n");
return 1; }
138 virtual vector<EMData*>
analyze();
147 return "Compute Inertia matrix for a volume";
158 d.
put(
"verbose",
EMObject::INT,
"Display progress if set, more detail with larger numbers");
184 if (
images.size()>1) { printf(
"ShapeAnalyzer takes only a single image\n");
return 1; }
188 virtual vector<EMData*>
analyze();
197 return "Experimental. Computes a set of values characterizing a 3-D volume. Returns a 3x2x1 image containing X, Y and Z axial distributions using axis squared and axis linear weighting.";
208 d.
put(
"verbose",
EMObject::INT,
"Display progress if set, more detail with larger numbers");
246 virtual vector<EMData*>
analyze();
255 return "k-means classification";
268 d.
put(
"verbose",
EMObject::INT,
"Display progress if set, more detail with larger numbers (9 max)");
269 d.
put(
"seedmode",
EMObject::INT,
"How to generate initial seeds. 0 - random element (default), 1 - max sum, min sum, linear");
271 d.
put(
"maxiter",
EMObject::INT,
"maximum number of iterations (default=100)");
272 d.
put(
"minchange",
EMObject::INT,
"Terminate if fewer than minchange members move in an iteration");
273 d.
put(
"mininclass",
EMObject::INT,
"Minumum number of particles to keep a class as good (not enforced at termination");
274 d.
put(
"slowseed",
EMObject::INT,
"Instead of seeding all classes at once, it will gradually increase the number of classes by adding new seeds in groups with large standard deviations");
275 d.
put(
"outlierclass",
EMObject::INT,
"The last class will be reserved for outliers. Any class containing fewer than n particles will be permanently moved to the outlier group. default = disabled");
276 d.
put(
"calcsigmamean",
EMObject::INT,
"Computes standard deviation of the mean image for each class-average (center), and returns them at the end of the list of centers");
315 vector<EMData*>::const_iterator iter;
316 for(iter=image_list.begin(); iter!=image_list.end(); ++iter) {
322 virtual vector<EMData*>
analyze();
331 return "Singular Value Decomposition from GSL. Comparable to pca";
346 d.
put(
"nimg",
EMObject::INT,
"total number of input images, required even with insert_image()");
378 virtual vector<EMData*>
analyze();
387 return "Calculate the circular average around the center in real space";
398 d.
put(
"verbose",
EMObject::INT,
"Display progress if set, more detail with larger numbers");
Analyzer class defines a way to take a List of images as input, and returns a new List of images.
virtual int insert_image(EMData *image)=0
insert a image to the list of input images
virtual TypeDict get_param_types() const =0
Get Analyzer parameter information in a dictionary.
virtual vector< EMData * > analyze()=0
main function for Analyzer, analyze input images and create output images
virtual Dict get_params() const
Get the Reconstructor's parameters in a key/value dictionary.
virtual void set_params(const Dict &new_params)
Set the Analyzer parameters using a key/value dictionary.
virtual string get_desc() const =0
Get the Analyzer's description.
virtual string get_name() const =0
Get the Analyzer's name.
vector< EMData * > images
virtual int insert_images_list(vector< EMData * > image_list)
insert a list of images to the list of input images
Calculate the circular average around the center in real space.
TypeDict get_param_types() const
Get Analyzer parameter information in a dictionary.
virtual vector< EMData * > analyze()
main function for Analyzer, analyze input images and create output images
virtual int insert_image(EMData *image)
insert a image to the list of input images
string get_desc() const
Get the Analyzer's description.
CircularAverageAnalyzer()
string get_name() const
Get the Analyzer's name.
Dict is a dictionary to store <string, EMObject> pair.
EMData stores an image's data and defines core image processing routines.
Factory is used to store objects to create new instances.
Inertia Matrix computer Computes the Inertia Matrix for a 3-D volume.
virtual int insert_image(EMData *image)
insert a image to the list of input images
string get_desc() const
Get the Analyzer's description.
string get_name() const
Get the Analyzer's name.
TypeDict get_param_types() const
Get Analyzer parameter information in a dictionary.
virtual vector< EMData * > analyze()
main function for Analyzer, analyze input images and create output images
KMeansAnalyzer Performs k-means classification on a set of input images (shape/size arbitrary) return...
void set_params(const Dict &new_params)
Set the Analyzer parameters using a key/value dictionary.
string get_desc() const
Get the Analyzer's description.
vector< EMData * > centers
void update_centers(int sigmas=0)
virtual int insert_image(EMData *image)
insert a image to the list of input images
string get_name() const
Get the Analyzer's name.
virtual vector< EMData * > analyze()
main function for Analyzer, analyze input images and create output images
TypeDict get_param_types() const
Get Analyzer parameter information in a dictionary.
Singular Value Decomposition from GSL.
virtual int insert_image(EMData *image)
insert a image to the list of input images
virtual vector< EMData * > analyze()
main function for Analyzer, analyze input images and create output images
string get_desc() const
Get the Analyzer's description.
virtual int insert_images_list(vector< EMData * > image_list)
insert a list of images to the list of input images
void set_params(const Dict &new_params)
Set the Analyzer parameters using a key/value dictionary.
TypeDict get_param_types() const
Get Analyzer parameter information in a dictionary.
string get_name() const
Get the Analyzer's name.
Shape characterization Computes a set of values characteristic of the shape of a volume.
string get_desc() const
Get the Analyzer's description.
virtual int insert_image(EMData *image)
insert a image to the list of input images
string get_name() const
Get the Analyzer's name.
TypeDict get_param_types() const
Get Analyzer parameter information in a dictionary.
virtual vector< EMData * > analyze()
main function for Analyzer, analyze input images and create output images
TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.
void put(const string &key, EMObject::ObjectType o, const string &desc="")
map< string, vector< string > > dump_analyzers_list()