COMP: Easier maintenance simplifying process to add remote module source

Following this commit, adding a remote module source to Slicer can
simply be done calling:

 Slicer_Remote_Add(Foo
   GIT_REPOSITORY git://github.com/john/foo
   GIT_TAG abcdef
   OPTION_NAME Slicer_BUILD_Foo
   LABELS REMOTE_MODULE
   )

As a side effect, (1) the option "Slicer_BUILD_Foo" will automatically be
added as an advanced option and (2) the CMake variables "Slicer_BUILD_Foo"
and "Foo_SOURCE_DIR" will be passed to Slicer inner build.

Additionally, by associating the "REMOTE_MODULE" label, the corresponding
source directory will be added automatically using a call 'add_directory'
similar to this one:

 add_directory(
   /path/to/Slicer-build/Foo
   /path/to/Slicer-build/Slicer-build/Module/Remote/Foo)

This happen in the Slicer/Modules/Remote/CMakeLists.txt file.

Finally, note that a new module named "ExternalProjectAddSource" has been
added, it is still experimental and should be considered as
internal to Slicer without any promise to keep backward compatibility.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22776 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Add warning in pimpl headers explaining it is not part of Slicer API

From: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22777 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Export qMRMLTreeViewPrivate class

Associated discussion: http://slicer-devel.65872.n3.nabble.com/Export-qMRMLTreeViewPrivate-tt4030532.html#a4030536

From: Csaba Pinter <csaba.pinter@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22778 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Configure include directories into SlicerConfig.cmake

This commit adds the following variables to the config file:

For each module:

- <Module>_INCLUDE_DIRS
- <ModuleLogic>_INCLUDE_DIRS
- <ModuleMRML>_INCLUDE_DIRS
- <ModuleWidget>_INCLUDE_DIRS

and for MRMLLogic:

- MRMLLogic_INCLUDE_DIRS

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22779 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Add DataStore module as remote module.

See [1] for details about remote module.

Fixes #3400

[1] http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Build_system/Remote_Module

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22780 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Fix configuration adding missing parameter to ExternalProject_Add_Source

Following commit r22776, the macro ExternalProject_Add_Source has been
added and jqPlot retrieved using it but the URL and URL_MD5 parameters
were not considered. This probably happens because the jqPlot directory
was already existing.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22781 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix "No handleSslErrors" slot run time error

Since by default moc (MetaObject compiler) doesn't understand ifdef, let
simply expect that SSL headers are available and unconditionally include
the "handleSslErrors". For this to work, we would have to associated a
compile definition with moc.

Since the QSslError header was already unconditionally included, defining
the slot is not a problem.

Error was:
 Object::connect: No such slot qSlicerWebWidget::handleSslErrors(QNetworkReply*, const QList<QSslError> & ) in /home/jchris/Projects/Slicer/Base/QTGUI/qSlicerWebWidget.cxx:99
 Object::connect:  (receiver name: 'qSlicerWebWidget')

From: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22782 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Fix build issue #0003522 due to nice() and getpid() calls.

From: Junichi Tokuda <tokuda@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22783 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Remove 'python_install_chmod_library' external project install step

Since the transition to CMake'ified python, this extra step is not
required anymore because the installed file has the expected
permissions.

Because the timestamp of the library is not systematically modified, it
will avoid the systematic recompilation of all project linking against
python library and speed up the overall MacOSX developer experience.


Before the update:

[...]
-- Installing: /path/to/python-install/lib/python2.7/zipfile.py
Performing python_install_chmod_library step for 'python'
Performing python_customPython_configure step for 'python'
Completed 'python'
$ ls -als python-install/lib/
total 3688
   0 drwxr-xr-x    5 kitware  staff      170 Dec 17 16:00 .
   0 drwxr-xr-x    6 kitware  staff      204 Dec 17 16:00 ..
3688 -rwxr-xr-x    1 kitware  staff  1886288 Dec 17 16:00 libpython2.7.dylib
   0 drwxr-xr-x    5 kitware  staff      170 Dec 17 16:00 pkgconfig
   0 drwxr-xr-x  234 kitware  staff     7956 Dec 17 16:00 python2.7


After the update:

[...]
-- Installing: /path/to/python-install/lib/python2.7/zipfile.py
[ 18%] Performing python_customPython_configure step for 'python'
[ 18%] Completed 'python'
$ ls -als python-install/lib/
total 3688
   0 drwxr-xr-x    5 kitware  staff      170 Dec 17 16:02 .
   0 drwxr-xr-x    6 kitware  staff      204 Dec 17 16:02 ..
3688 -rwxr-xr-x    1 kitware  staff  1886288 Dec 17 16:02 libpython2.7.dylib
   0 drwxr-xr-x    5 kitware  staff      170 Dec 17 16:02 pkgconfig
   0 drwxr-xr-x  234 kitware  staff     7956 Dec 17 16:02 python2.7

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22784 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add prototype LandmarkRegistration and CompareVolumes modules

These are still work-in-progress modules, but should be usable to
support interatcive registration.

See https://github.com/pieper/LandmarkRegistration

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22785 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: check that the frame image has been initialized

Fixes #3535


git-svn-id: http://svn.slicer.org/Slicer4/trunk@22786 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add 'DataStore' to top-level module category.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22787 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Added missing node references update to scene->AddNode methods

Fixes http://na-mic.org/Mantis/view.php?id=3539.

Problem was that node references were not updated in the scene when
node->SetScene(scene) was called for the node before scene->AddNode(node).

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22788 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Improve readability of vtkMRMLScene::AddReferencedNodeID method

This commit does not introduced any functional change, it just makes
the code cleaner.

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22789 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Update doxygen comment of vtkMRMLScene::AddReferencedNodeID

The comment document the changes introduced by commit r22669

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22790 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Fix module history to keep most recent selected module last

The current implementation is a dysfunctional mix between
a "module history navigator" and "fixed workflow navigator".

This commit implements "module history navigator" behavior,
which is useful for generic Slicer use.

A "fixed workflow navigator" is a very special case, it is only
applicable when all the modules are part of the workflow,
there are no loops, skipping of steps, auxiliary modules, etc.

Considering the following convention, the update is illustrated
below.

Legend:

  -> X : Go to module X
  P    : List of module in the "previous stack"
  N    : List of module in the "next stack"

Current behaviour:

   A     P: -    |  N: -
-> B     P: A    |  N: -
-> C     P: BA   |  N: -
-> D     P: CBA  |  N: -
-> A     P: -    |  N: BCD
-> E     P: A    |  N: -

After integrating this commit, the behaviour is then:

   A     P: -    |  N: -
-> B     P: A    |  N: -
-> C     P: BA   |  N: -
-> D     P: CBA  |  N: -
-> A     P: DCB  |  N: -
-> E     P: ADCB |  N: -

where

A: Welcome module
B: Annotations
C: Data
D: DataStore
E: SampleData

Fixes #3533

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22791 3bd1e089-480b-0410-8dfb-8563597acbee
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