#include <processor.h>
Inheritance diagram for EMAN::BinaryOperateProcessor< Type >:


Public Member Functions | |
| virtual void | process_inplace (EMData *image) |
| virtual string | get_name () const |
| Get the processor's name. | |
| virtual string | get_desc () const |
| Get the descrition of this specific processor. | |
| virtual TypeDict | get_param_types () const |
| Get processor parameter information in a dictionary. | |
Static Public Member Functions | |
| Processor * | NEW () |
Static Public Attributes | |
| const string | NAME |
Private Attributes | |
| Type | op |
Currently the MaxPixelOperator and MinPixelOperator are the only ones utilized - see processor.cpp where the Processor Factory constructor is defined to get an idea of how to add another one Initially added at the request of Dr Matthew Baker NOTE: binary is meant in the sense of the standard algorithms, NOT in the sense of a black and white image
| with | the other image that will be used generate the image with the maximum (or minimum, etc) pixel values |
Definition at line 5540 of file processor.h.
|
|||||||||
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 5565 of file processor.h. References EMAN::BinaryOperateProcessor< Type >::op. 05566 {
05567 return op.get_desc();
05568 }
|
|
|||||||||
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 5560 of file processor.h. References EMAN::BinaryOperateProcessor< Type >::op. 05561 {
05562 return op.get_name();
05563 }
|
|
|||||||||
|
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. Definition at line 5575 of file processor.h. References EMAN::TypeDict::put(). 05576 {
05577 TypeDict d;
05578 d.put("with", EMObject::EMDATA,"The second image");
05579 return d;
05580 }
|
|
|||||||||
|
Definition at line 5570 of file processor.h. 05571 {
05572 return new BinaryOperateProcessor<Type>();
05573 }
|
|
||||||||||
|
Implements EMAN::Processor. Definition at line 5546 of file processor.h. References EMAN::EMData::get_data(), EMAN::EMData::get_size(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), EMAN::Dict::has_key(), ImageDimensionException, InvalidParameterException, and EMAN::EMData::update(). 05546 {
05547 if ( ! params.has_key("with") ) throw InvalidParameterException("You must supply the \"with\" parameter");
05548 EMData* with = params["with"];
05549
05550 if ( with->get_xsize() != image->get_xsize() || with->get_ysize() != image->get_ysize() || with->get_zsize() != image->get_zsize() )
05551 throw ImageDimensionException("The images you are operating on do not have the same dimensions");
05552
05553 float* image_data = image->get_data();
05554 float* with_data = with->get_data();
05555
05556 std::transform(image_data,image_data+image->get_size(),with_data,image_data,Type::binary_operate);
05557 image->update();
05558 }
|
|
|||||
|
Definition at line 5582 of file processor.h. |
|
|||||
|
Definition at line 5584 of file processor.h. Referenced by EMAN::BinaryOperateProcessor< Type >::get_desc(), and EMAN::BinaryOperateProcessor< Type >::get_name(). |
1.3.9.1