#include <processor.h>
Inheritance diagram for EMAN::CircularMaskProcessor:
Public Member Functions | |
CircularMaskProcessor () | |
void | set_params (const Dict &new_params) |
Set the processor parameters using a key/value dictionary. | |
string | get_desc () const |
Get the descrition of this specific processor. | |
TypeDict | get_param_types () const |
Get processor parameter information in a dictionary. | |
Protected Member Functions | |
void | calc_locals (EMData *image) |
bool | is_valid () const |
void | process_pixel (float *pixel, int xi, int yi, int zi) const |
virtual void | process_dist_pixel (float *pixel, float dist) const =0 |
Protected Attributes | |
int | inner_radius |
int | outer_radius |
int | inner_radius_square |
int | outer_radius_square |
float | dx |
float | dy |
float | dz |
float | xc |
float | yc |
float | zc |
inner_radius | inner mask radius. optional, default=-1 | |
outer_radius | outer mask radius | |
dx | Modify mask center by dx relative to the default center nx/2 | |
dy | Modify mask center by dy relative to the default center ny/2 | |
dz | Modify mask center by dz relative to the default center nz/2 |
Definition at line 2122 of file processor.h.
|
Definition at line 2125 of file processor.h. 02125 :inner_radius(0), outer_radius(0), inner_radius_square(0), 02126 outer_radius_square(0), dx(0), dy(0), dz(0), xc(0), yc(0), zc(0) 02127 { 02128 }
|
|
Reimplemented from EMAN::CoordinateProcessor. Reimplemented in EMAN::MaskEdgeMeanProcessor, and EMAN::MaskGaussInvProcessor. Definition at line 1406 of file processor.cpp. References inner_radius, inner_radius_square, outer_radius, outer_radius_square, xc, yc, and zc. 01407 { 01408 xc = nx / 2.0f + dx; 01409 yc = ny / 2.0f + dy; 01410 zc = nz / 2.0f + dz; 01411 01412 01413 if (outer_radius <= 0) { 01414 outer_radius = nx / 2; 01415 outer_radius_square = outer_radius * outer_radius; 01416 } 01417 01418 if (inner_radius <= 0) { 01419 inner_radius_square = 0; 01420 } 01421 }
|
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Reimplemented in EMAN::MaskSharpProcessor, EMAN::MaskEdgeMeanProcessor, EMAN::MaskNoiseProcessor, EMAN::MaskGaussProcessor, EMAN::MaskGaussInvProcessor, EMAN::MakeRadiusSquaredProcessor, and EMAN::MakeRadiusProcessor. Definition at line 2160 of file processor.h. 02161 { 02162 return "CircularMaskProcessor applies a circular mask to the data.This is the base class for specific circular mask processors.Its subclass must implement process_dist_pixel()."; 02163 }
|
|
Get processor parameter information in a dictionary. Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.
Reimplemented from EMAN::Processor. Reimplemented in EMAN::MaskSharpProcessor, EMAN::MaskEdgeMeanProcessor, EMAN::MaskGaussProcessor, and EMAN::MaskGaussInvProcessor. Definition at line 2165 of file processor.h. References EMAN::TypeDict::put(). 02166 { 02167 TypeDict d; 02168 02169 d.put("inner_radius", EMObject::INT, "inner mask radius. optional, default=-1"); 02170 d.put("outer_radius", EMObject::INT, "outer mask radius"); 02171 02172 d.put("dx", EMObject::FLOAT, 02173 "Modify mask center by dx relative to the default center nx/2"); 02174 d.put("dy", EMObject::FLOAT, 02175 "Modify mask center by dy relative to the default center ny/2"); 02176 d.put("dz", EMObject::FLOAT, 02177 "Modify mask center by dz relative to the default center nz/2"); 02178 02179 return d; 02180 }
|
|
Reimplemented from EMAN::CoordinateProcessor. Definition at line 2184 of file processor.h. 02185 {
02186 return (!is_complex);
02187 }
|
|
|
Implements EMAN::CoordinateProcessor. Definition at line 2189 of file processor.h. References dist(). 02190 { 02191 float dist = (xi - xc) * (xi - xc) + (yi - yc) * (yi - yc) + (zi - zc) * (zi - zc); 02192 process_dist_pixel(pixel, dist); 02193 }
|
|
Set the processor parameters using a key/value dictionary.
Reimplemented from EMAN::Processor. Reimplemented in EMAN::MaskSharpProcessor, EMAN::MaskEdgeMeanProcessor, and EMAN::MaskGaussProcessor. Definition at line 2130 of file processor.h. 02131 { 02132 params = new_params; 02133 02134 if (params.has_key("inner_radius")) { 02135 inner_radius = params["inner_radius"]; 02136 inner_radius_square = inner_radius * inner_radius; 02137 } 02138 else { 02139 inner_radius = -1; 02140 inner_radius_square = -1; 02141 } 02142 02143 if (params.has_key("outer_radius")) { 02144 outer_radius = params["outer_radius"]; 02145 outer_radius_square = outer_radius * outer_radius; 02146 } 02147 else { 02148 outer_radius = INT_MAX; 02149 outer_radius_square = INT_MAX; 02150 } 02151 02152 if (params.has_key("xc")) xc = params["xc"]; 02153 if (params.has_key("yc")) yc = params["yc"]; 02154 if (params.has_key("zc")) zc = params["zc"]; 02155 if (params.has_key("dx")) dx = params["dx"]; 02156 if (params.has_key("dy")) dy = params["dy"]; 02157 if (params.has_key("dz")) dz = params["dz"]; 02158 }
|
|
Definition at line 2201 of file processor.h. |
|
Definition at line 2201 of file processor.h. |
|
Definition at line 2201 of file processor.h. |
|
Definition at line 2197 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2199 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2198 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2200 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2202 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2202 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2202 of file processor.h. Referenced by calc_locals(). |