#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 2301 of file processor.h.
|
|
Definition at line 2304 of file processor.h. 02304 :inner_radius(0), outer_radius(0), inner_radius_square(0), 02305 outer_radius_square(0), dx(0), dy(0), dz(0), xc(0), yc(0), zc(0) 02306 { 02307 }
|
|
|
Reimplemented from EMAN::CoordinateProcessor. Reimplemented in EMAN::MaskEdgeMeanProcessor, and EMAN::MaskGaussInvProcessor. Definition at line 1527 of file processor.cpp. References EMAN::Util::fast_floor(), inner_radius, inner_radius_square, outer_radius, outer_radius_square, xc, yc, and zc. 01528 {
01529 xc = Util::fast_floor(nx/2.0f) + dx;
01530 yc = Util::fast_floor(ny/2.0f) + dy;
01531 zc = Util::fast_floor(nz/2.0f) + dz;
01532
01533 if (outer_radius < 0) {
01534 outer_radius = nx / 2 + outer_radius +1;
01535 outer_radius_square = outer_radius * outer_radius;
01536 }
01537
01538 if (inner_radius <= 0) {
01539 inner_radius_square = 0;
01540 }
01541 }
|
|
|
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 2339 of file processor.h. 02340 {
02341 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().";
02342 }
|
|
|
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 2344 of file processor.h. References EMAN::TypeDict::put(). 02345 {
02346 TypeDict d;
02347
02348 d.put("inner_radius", EMObject::INT, "inner mask radius. optional");
02349 d.put("outer_radius", EMObject::INT, "outer mask radius. Negative value -> box radius + outer_radius +1");
02350
02351 d.put("dx", EMObject::FLOAT,
02352 "Modify mask center by dx relative to the default center nx/2");
02353 d.put("dy", EMObject::FLOAT,
02354 "Modify mask center by dy relative to the default center ny/2");
02355 d.put("dz", EMObject::FLOAT,
02356 "Modify mask center by dz relative to the default center nz/2");
02357
02358 return d;
02359 }
|
|
|
Reimplemented from EMAN::CoordinateProcessor. Definition at line 2363 of file processor.h. 02364 {
02365 return (!is_complex);
02366 }
|
|
||||||||||||
|
||||||||||||||||||||
|
Implements EMAN::CoordinateProcessor. Definition at line 2368 of file processor.h. References dist(). 02369 {
02370 float dist = (xi - xc) * (xi - xc) + (yi - yc) * (yi - yc) + (zi - zc) * (zi - zc);
02371 process_dist_pixel(pixel, dist);
02372 }
|
|
|
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 2309 of file processor.h. 02310 {
02311 params = new_params;
02312
02313 if (params.has_key("inner_radius")) {
02314 inner_radius = params["inner_radius"];
02315 inner_radius_square = inner_radius * inner_radius;
02316 }
02317 else {
02318 inner_radius = -1;
02319 inner_radius_square = -1;
02320 }
02321
02322 if (params.has_key("outer_radius")) {
02323 outer_radius = params["outer_radius"];
02324 outer_radius_square = outer_radius * outer_radius;
02325 }
02326 else {
02327 outer_radius = INT_MAX;
02328 outer_radius_square = INT_MAX;
02329 }
02330
02331 if (params.has_key("xc")) xc = params["xc"];
02332 if (params.has_key("yc")) yc = params["yc"];
02333 if (params.has_key("zc")) zc = params["zc"];
02334 if (params.has_key("dx")) dx = params["dx"];
02335 if (params.has_key("dy")) dy = params["dy"];
02336 if (params.has_key("dz")) dz = params["dz"];
02337 }
|
|
|
Definition at line 2380 of file processor.h. |
|
|
Definition at line 2380 of file processor.h. |
|
|
Definition at line 2380 of file processor.h. |
|
|
Definition at line 2376 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2378 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2377 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2379 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2381 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2381 of file processor.h. Referenced by calc_locals(). |
|
|
Definition at line 2381 of file processor.h. Referenced by calc_locals(). |
1.3.9.1