ENH: update LandmarkRegistration to support RegistrationPlugins

Still some work to do on the built-in plugins, but the framework
is now in place for extensions (like SlicerRT/Plastimatch) to provide
registration plugins.

Affine registration is now a plugin and it works like the previous
version of LandmarkRegistration which supported only Affine.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22792 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: handle case where TCL is disabled but EM is set to ON.

If you have first configured with TCL on, then EMSegment is on
by default too.  But turning off TCL does not turn off EMSegment,
so the linker was failing to find the EMSegment logic library.

This patch is consistent with the rest of the logic in the
CMakeLists, but longer term EMSegment should be explicitly
disabled if it doesn't have the right prerequisites.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22793 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: fix warnings in cmake/ctk/python

See:
https://github.com/commontk/CTK/pull/430

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22794 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Simplify code using "vtkNew" to create "vtkSlicerTask" in CLI logic

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22795 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Kill CLI executable process on Slicer exit.

The use of a MutexLock is required because the process have been
initiated from a thread and they are killed by calling "itksysProcess_Kill()"
from the main thread.

In "ApplyTask()", the MutexLock is Locked/Unlocked at the position:

1) After calling "itksysProcess_Kill()" in "KillProcesses()", the call to
"itksysProcess_WaitForExit()" in "ApplyTask()" leads to a call
"kwsysProcessCleanup". Since calling "kwsysProcessCleanup" frees the memory
(i.e free ForkPIDs, RealWorkingDirectory and also cleanup descriptor)
 and that "kwsysProcess_Kill" expects the ForkPIDs array to be available,
it is required to use a mutex to make sure the call to "kwsysProcess_Kill"
completes before "itksysProcess_WaitForExit" is executed.

2) When calling "itksysProcess_Delete()" and updating the vector of
"Processes" that is accessed from both the main thread and the ApplyTask
thread.

Fixes #3395

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22796 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Pass CMAKE_BUILD_TYPE to external project for all configurations

Thanks to Hans Johnson <hans-johnson@uiowa.edu> for reporting the problem.

Before this commit, CMAKE_BUILD_TYPE was passed to external project only
the first configuration if it wasn't already defined (by passing -D option).

Co-authored-by: Hans Johnson <hans-johnson@uiowa.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22797 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Ensure python is forced to Release when built on single config system

Following previous commit (r22797), since CMAKE_BUILD_TYPE is now properly
passed to all projects, it is important to force the value associated to
python to Release.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22798 3bd1e089-480b-0410-8dfb-8563597acbee