#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 2342 of file processor.h.
|
Definition at line 2345 of file processor.h. 02345 :inner_radius(0), outer_radius(0), inner_radius_square(0), 02346 outer_radius_square(0), dx(0), dy(0), dz(0), xc(0), yc(0), zc(0) 02347 { 02348 }
|
|
Reimplemented from EMAN::CoordinateProcessor. Reimplemented in EMAN::MaskEdgeMeanProcessor, and EMAN::MaskGaussInvProcessor. Definition at line 1534 of file processor.cpp. References EMAN::Util::fast_floor(), inner_radius, inner_radius_square, outer_radius, outer_radius_square, xc, yc, and zc. 01535 { 01536 xc = Util::fast_floor(nx/2.0f) + dx; 01537 yc = Util::fast_floor(ny/2.0f) + dy; 01538 zc = Util::fast_floor(nz/2.0f) + dz; 01539 01540 if (outer_radius < 0) { 01541 outer_radius = nx / 2 + outer_radius +1; 01542 outer_radius_square = outer_radius * outer_radius; 01543 } 01544 01545 if (inner_radius <= 0) { 01546 inner_radius_square = 0; 01547 } 01548 }
|
|
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 2380 of file processor.h. 02381 { 02382 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()."; 02383 }
|
|
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 2385 of file processor.h. References EMAN::TypeDict::put(). 02386 { 02387 TypeDict d; 02388 02389 d.put("inner_radius", EMObject::INT, "inner mask radius. optional"); 02390 d.put("outer_radius", EMObject::INT, "outer mask radius. Negative value -> box radius + outer_radius +1"); 02391 02392 d.put("dx", EMObject::FLOAT, 02393 "Modify mask center by dx relative to the default center nx/2"); 02394 d.put("dy", EMObject::FLOAT, 02395 "Modify mask center by dy relative to the default center ny/2"); 02396 d.put("dz", EMObject::FLOAT, 02397 "Modify mask center by dz relative to the default center nz/2"); 02398 02399 return d; 02400 }
|
|
Reimplemented from EMAN::CoordinateProcessor. Definition at line 2404 of file processor.h. 02405 {
02406 return (!is_complex);
02407 }
|
|
|
Implements EMAN::CoordinateProcessor. Definition at line 2409 of file processor.h. References dist(). 02410 { 02411 float dist = (xi - xc) * (xi - xc) + (yi - yc) * (yi - yc) + (zi - zc) * (zi - zc); 02412 process_dist_pixel(pixel, dist); 02413 }
|
|
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 2350 of file processor.h. 02351 { 02352 params = new_params; 02353 02354 if (params.has_key("inner_radius")) { 02355 inner_radius = params["inner_radius"]; 02356 inner_radius_square = inner_radius * inner_radius; 02357 } 02358 else { 02359 inner_radius = -1; 02360 inner_radius_square = -1; 02361 } 02362 02363 if (params.has_key("outer_radius")) { 02364 outer_radius = params["outer_radius"]; 02365 outer_radius_square = outer_radius * outer_radius; 02366 } 02367 else { 02368 outer_radius = INT_MAX; 02369 outer_radius_square = INT_MAX; 02370 } 02371 02372 if (params.has_key("xc")) xc = params["xc"]; 02373 if (params.has_key("yc")) yc = params["yc"]; 02374 if (params.has_key("zc")) zc = params["zc"]; 02375 if (params.has_key("dx")) dx = params["dx"]; 02376 if (params.has_key("dy")) dy = params["dy"]; 02377 if (params.has_key("dz")) dz = params["dz"]; 02378 }
|
|
Definition at line 2421 of file processor.h. |
|
Definition at line 2421 of file processor.h. |
|
Definition at line 2421 of file processor.h. |
|
Definition at line 2417 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2419 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2418 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2420 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2422 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2422 of file processor.h. Referenced by calc_locals(). |
|
Definition at line 2422 of file processor.h. Referenced by calc_locals(). |