Next: Adding Directly to the
Up: Processors
Previous: Processors
Contents
Index
Located in the plugin directory of the EMAN2 source
(i.e. EMAN2/src/eman2/plugins) are various template files including
processor_template.h and processor_template.cpp. These are the files
that will be used for new processor installation. Begin by editing
processor_template.h.
- Change the occurrences of "XYZ" in "XYZProcessor" with the name of
the new processor
- Don't forget to change the string in get_name() to the name of
the processor (this is the name that will be used to
call the processor)
- Edit the string in get_desc() with a brief description of the
processor. Place a more detailed descriptions elsewhere such as
before the class or before the functions (see
3.3 for coding style information)
- Define the processor's parameters in get_param_types()
- A description string can be added as a third param to the
TypeDict::put() function to describe the variables
- In the class constructor of FilterFactorExt uncomment the line
"Factory
Processor
::add(&dProcessor::NEW);"
Now edit processor_template.cpp
- In processor() add the implementation code of the new
processor.
- The existing template has sample code showing how to access the
variables that where defined in get_para_types()
- Note that the sample code included in the template is enclosed in
a conditional statement that essentially causes all of
the code tobe skipped.
Finally rebuild EMAN:
- %
- cd ../../build
- %
- make
The new processor should now be available using the name that was
specified in get_name().
Next: Adding Directly to the
Up: Processors
Previous: Processors
Contents
Index
2013-06-11