next up previous contents index
Next: Aligners Up: Processors Previous: Using Templates:   Contents   Index

Adding Directly to the Core:

If the new processor code has already been created using the supplied templates, then adding to the core can be done as follows:

  1. Open processor.h in src/eman2/libEM
  2. Copy the class you defined in processor_template.h and paste it in the file
  3. Open processor.cpp (also located in src/eman2/libEM)
  4. Copy and paste the class from processor_template.cpp to processor.cpp. Header file include statements may also need to be copied.
  5. In the template class Factory located in the begining of processor.cpp add a line "force_add(&newProcessor::NEW)" where "newProcessor" is the name of the processor class that is being added
  6. Rebuild EMAN2

The instructions for adding a new processor without first using templates go as follows:

  1. In src/eman2/libEM open processor.h
  2. Towards the end of the file there is an example class called XYZProcessor. Follow the first 3 steps listed in "Using Templates".
  3. Open processor.cpp and write an implementation for the process() function that was just defined in processor.h
  4. Repeat the last two steps (5 and 6) from the template installation


next up previous contents index
Next: Aligners Up: Processors Previous: Using Templates:   Contents   Index
2013-06-11