Current Page: NeXtMidas Training Primitives Open, Process, Close open()
- - | The `open()` method. Should handle all initialization. This includes getting any command-line parameters or switches. Do not initialize in a constructor. This will cause problems if the primitive needs to be restarted. (More on this later.) NeXtMidas uses reflection to call primitives. If the constructor takes in any arguments, NeXtMidas won't know how to call it. Primitives should not even have a constructor declared. Should open any files used. If a pipe is opened in `process()`, there may be data loss. Should return one of the following:
    `NORMAL` | Normal operation, ready for `process()`.
    `FINISH` | Nothing to process, skip to `close()`. (This is rarely used.)
Example of using `FINISH`: A primitive that takes in a list of files to process may return `FINISH` if no files are given.