#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 2263 of file processor.h.
|
|
Definition at line 2266 of file processor.h. 02266 :inner_radius(0), outer_radius(0), inner_radius_square(0), 02267 outer_radius_square(0), dx(0), dy(0), dz(0), xc(0), yc(0), zc(0) 02268 { 02269 }
|
|
|
Reimplemented from EMAN::CoordinateProcessor. Reimplemented in EMAN::MaskEdgeMeanProcessor, and EMAN::MaskGaussInvProcessor. Definition at line 1499 of file processor.cpp. References EMAN::Util::fast_floor(), inner_radius, inner_radius_square, outer_radius, outer_radius_square, xc, yc, and zc. 01500 {
01501 xc = Util::fast_floor(nx/2.0f) + dx;
01502 yc = Util::fast_floor(ny/2.0f) + dy;
01503 zc = Util::fast_floor(nz/2.0f) + dz;
01504
01505 if (outer_radius < 0) {
01506 outer_radius = nx / 2 + outer_radius +1;
01507 outer_radius_square = outer_radius * outer_radius;
01508 }
01509
01510 if (inner_radius <= 0) {
01511 inner_radius_square = 0;
01512 }
01513 }
|
|
|
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 2301 of file processor.h. 02302 {
02303 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().";
02304 }
|
|
|
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 2306 of file processor.h. References EMAN::TypeDict::put(). 02307 {
02308 TypeDict d;
02309
02310 d.put("inner_radius", EMObject::INT, "inner mask radius. optional");
02311 d.put("outer_radius", EMObject::INT, "outer mask radius. Negative value -> box radius + outer_radius +1");
02312
02313 d.put("dx", EMObject::FLOAT,
02314 "Modify mask center by dx relative to the default center nx/2");
02315 d.put("dy", EMObject::FLOAT,
02316 "Modify mask center by dy relative to the default center ny/2");
02317 d.put("dz", EMObject::FLOAT,
02318 "Modify mask center by dz relative to the default center nz/2");
02319
02320 return d;
02321 }
|
|
|
Reimplemented from EMAN::CoordinateProcessor. Definition at line 2325 of file processor.h. 02326 {
02327 return (!is_complex);
02328 }
|
|
||||||||||||
|
||||||||||||||||||||
|
Implements EMAN::CoordinateProcessor. Definition at line 2330 of file processor.h. References dist(). 02331 {
02332 float dist = (xi - xc) * (xi - xc) + (yi - yc) * (yi - yc) + (zi - zc) * (zi - zc);
02333 process_dist_pixel(pixel, dist);
02334 }
|
|
|
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 2271 of file processor.h. 02272 {
02273 params = new_params;
02274
02275 if (params.has_key("inner_radius")) {
02276 inner_radius = params["inner_radius"];
02277 inner_radius_square = inner_radius * inner_radius;
02278 }
02279 else {
02280 inner_radius = -1;
02281 inner_radius_square = -1;
02282 }
02283
02284 if (params.has_key("outer_radius")) {
02285 outer_radius = params["outer_radius"];
02286 outer_radius_square = outer_radius * outer_radius;
02287 }
02288 else {
02289 outer_radius = INT_MAX;
02290 outer_radius_square = INT_MAX;
02291 }
02292
02293 if (params.has_key("xc")) xc = params["xc"];
02294 if (params.has_key("yc")) yc = params["yc"];
02295 if (params.has_key("zc")) zc = params["zc"];
02296 if (params.has_key("dx")) dx = params["dx"];
02297 if (params.has_key("dy")) dy = params["dy"];
02298 if (params.has_key("dz")) dz = params["dz"];
02299 }
|
|
|
Definition at line 2342 of file processor.h. |
|
|
Definition at line 2342 of file processor.h. |
|
|
Definition at line 2342 of file processor.h. |
|
|
Definition at line 2338 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2340 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2339 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2341 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2343 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2343 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2343 of file processor.h. Referenced by calc_locals(). |
1.3.9.1