First check-in of many for a code refactoring that will eventually:
1. Enable a common class for reading in all minctracc parameters. This should allow consolidation of some of the code in the LSQ6/12 and NLIN modules.
2. Have the ability to read in and adjust registration parameters for HierarchicalMinctracc and LSQ12ANTSNlin calls.

This check-in does the following:
1. Creates a new file (minc_parameters.py) and two new classes (setMincANTSParams and setMinctraccParams) which handle the logic of parameter setting from a specified .csv.
2. By virtue of creating the classes in 1, the logic for setting these parameters was deleted from the NLIN classes. NlinBase was also modified accordingly.

Addresses Issues #83 and #84.
Second check-in addressing Issues #83 and #84.

Continuation of commit ca5999a6e351, the following changes have been made:
1. Splitting of setMinctraccParams into two classes: a Nlin base class and a child LSQ12 class. NLIN is the base class because the linear parameters that may be specified are a subset of the total allowed parameters, and setParams handles this appropriately.
2. created a child ANTS class that reads in a single generation of ANTS parameters. This may turn into the base class as development proceeds.
3. Moved the setting of LSQ12 params out of the LSQ12.py module and into the setLSQ12MinctraccParams class, pursuant to point 1, above.
4. Added subject_matter as an argument for setting minctracc params (both LSQ12 and non-linear). This might be changed depending on how we handle Issue #88.
Third check-in addressing Issues #83 and #84.

Added w_translations to minctracc parameters that can be specified via .csv. Updated LSQ12.py, NLIN.py and example protocols accordingly.

Two other misc changes:
1. Removed LinearHierarchicalMinctracc. It was unfinished and unused.
2. Updated comment in minc_parameters.py, accidentally omitted from previous check-in.
Fourth check-in addressing Issue #83.

Modified LSQ6 module to use new classes for setting parameters.

Major change: Created setLSQ6MinctraccParams and modified LSQ6HierarchicalMinctracc accordingly to use this class, removing duplicate code. setHierarchyOptions and setInitialMinctraccTransform no longer needed.
Related: Added self.fileRes to LSQ6Base for use in parameter setting. getFinestResolution now called only once. Renamed some parameters for consistency with other modules (necessary when using setLSQ6MinctraccParams).

Many minor changes:
1. Renamed lsq12_example_protocol to minctracc_example_linear_protocol since it can be used for LSQ6 and LSQ12.
2. Reordered nlin_protocol so optimization is listed last.
3. Updated help in LSQ6, 12 and NLIN modules to point to example .csv files. Updated general minc_parameters.py help.
4. Removed subject_matter from setNLINMinctraccParams, because it is unnecessary at this point. (This also allowed for cleaner design when adding initial_transform to setLSQ6MinctraccParams.) Again, may revisit this when we handle Issue #88.
5. Fixed bug so that simplex is now converted to a float instead of an int.
Added classes so that the appropriate option groups are now included in minc_parameters.py.

The command line options for --lsq6-protocol, --lsq12-protocol, and --nlin-protocol were moved here, and a series of classes were written to handle adding these options to the option groups in different modules.

As such, these options were removed (as written) from the LSQ6, LSQ12 and NLIN modules and re-added using the new framework. All were added to MBM.

Other minor changes:
1. Removed Matthijs' clever code for the epilogue, since we reference example protocols in the help for each option. (And will in the documentation as well.)
2. Fixed a bug in LSQ12 with the w_translations array--sloppy copy and paste, too many parameters!
3. Moved --calc-stats option to stats module.
4. Re-organized order of MBM options.
Added ability to change registration parameters in MAGeT and registration chain. (Issue #84.)

Major changes:
1. HierarchicalMinctracc, LSQ12ANTSNlin, MAGeTMask and MAGeTRegister now take registration protocols (aka a command line specified csv file) as arguments. For HM and LSQ12ANTSNlin, this means that individual registration parameters are no longer specified. Default for all is if no protocols are specified, the default registration parameters are used.
2. HM and LSQ12ANTSNlin also take subject_matter as an argument, in preparation for addressing Issue #88, but nothing is currently done with it.
3. HM takes includeLinear=True as an argument. Default is that LSQ12 HM is run prior to non-linear generations. If includeLinear=False is specified, only non-linear registrations are run.
4. Another option group has been added to minc_parameters, so that LSQ12 and non-linear protocols only may be specified. Not sure if this is overkill, but since this is what is needed for registration chain and MAGeT (and likely others down the road), adding it for now.

Minor changes:
1. Added a comment to the top of pairwise nlin to indicate that it is deprecated and may be combined in the future with the registration chain code because it is so similar. This is in part because I have not updated this module in a while, and did not make the above changes to the code.
2. In MAGeTRegister, changed method to regMethod for clarity and to be consistent with MAGeTMask.
Moved HierarchicalMinctracc to minc_modules and removed hierarchical_minctracc.py.

Originally when I created hierarchical_minctracc.py, I envisioned several classes in it. As the code has evolved, versions of HM (e.g. the LSQ6 version) are elsewhere, and there is no need to keep HierarchicalMinctracc in its own file.
Fixed bug in registration_chain.py.

In all of my 'clever fixing' I introduced a bug so that the registration chain would only run if a non-linear average was specified. We want the ability to run the registration chain code and calculate statistics between all of the pairs, even if an average is not present.
Numerous changes to simplify and streamline stats calculations. Related to Issue #91.

Biggest changes:
1. Scaled jacobians now calculated with full non-linear transforms, using either inverted lastXfm from input to target, or concatenating an additional specified xfm.
2. Jacobians calculated with pure non-linear target to input, concatenated with linear part of input to target. Concatenation now done correctly.
3. Removed the ability to subtract out an average displacement (see Issue #91). We may add this back in the future, but for now, it is gone.

Specific implementation details:
1. Lots of general clean up of CalcStats and CalcChainStats. To wit:
1a. linAndNlinDisplacement now a single function for both CalcStats and its child class, CalcChainStats. Differences between the two are encapsulated in the calcFullDisplacement and calcNlinDisplacement functions. calcNlinDisplacement itself a new function!
1b. Removal of average displacement calculation (e.g. in __init__ and setupDispArray calls, as well as removed code in linAndNlinDisplacement)
1c. calcDetAndLogDet now called twice in fullStatsCalc: once with pure non-linear displacement (jacobians) and once with full displacement (scaled jacobians)
1d. createOutputFileName function condenses three functions into one!
1e. Clean-up of calcDetAndLogDet to address 1c. and just generally be more streamlined.

Other minor changes:
1. Fixed small bug in setting the NLIN minctracc registration protocol. (Name is reg_protocol, not nlin_protocol.)
2. In NLIN modules, setLastBasevol now called in final iteration after registration complete, so that lastBaseVol in new "final" group is set properly.
Added default MAGeT protocols to repository. Related to Issues #83 and #84.

When running MAGeT, these protocols should be specified for the --lsq12-protocol (default_linear_MAGeT_prot.csv) and the --nlin-protocol (default_nlin_MAGeT_minctracc_prot.csv) options.
Ideally, these protocols would be the defaults for MAGeT, and you could use them without specifying these options; however, I am undecided on how to implement this change based on the current framework for specifying protocols. In the meantime, I am adding these csv files and updating the documentation.
Fixed small bug in LSQ6 module that was causing -est_center and -est_translations to be specified for all initial lsq6 stages, even if --lsq6-simple (corresponding to -lsq6 -identity) was specified on the command line.
Changes related to MVE's code review of commit 67f9f55e14

Largest changes:
1. Changed scaled jacobians to absolute jacobians and jacobians to relative jacobians throughout.
2. Changes self.linearXfm to self.linearPartOfNlin throughout.
3. Updated comments for clarity.

Related to Issue #91.
Merge branch 'mbm-redesign'