ENH: Initial refactoring of extension manager UI

Refactor right corner area of extension manager into a .ui file, similar
to how the left corner area (navigation buttons) is already handled.
This allows us to have separate search widgets per tab (allowing for
independent search states, if/when support for searching installed
extensions is added), and also to add a 'configure' button (which we do)
that provides independent menus per tab.

The menus are created, but not yet functional. Icons (from the Public
Domain Tango theme) are also added. (The 'check for updates' icon uses
the theme pixmaps. Tango does not provide a 'configure' icon as such, so
the modified svg from which the pixmaps were generated is also being
committed.)

Issue #2089
Issue #2145

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23398 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add function to list archives

Add a function to vtkArchive.cxx to obtain the list of files in an
archive without extracting the archive. Also, fix parameter name in
(misnamed) extract_tar to make at least some kind of sense.
("archiveFileName", as in list_archive(), would be better, since
extract_tar likewise works on non-tar archives, but for now leaving it
consistent with the function name.)

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23399 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Correctly encode archive file name

Use qPrintable() (which uses QString::toLocal8Bit() under the hood) to
encode the QString archive file name to char const* for passing to
extract_tar, rather than QString::toLatin1(), which is unlikely to
produce the correct bytes (the underlying system calls are more likely
to want system locale encoding) in case of a non-ASCII file name.

This sort of thing appears to be endemic to Slicer, but I don't care to
propagate that to the forthcoming call to list_archive(); thus, making
it consistent in this file at least.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23400 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add ability to install extension from file

Hook up 'install from file' action in extension manager. Create an
overload of qSlicerExtensionsManagerModel::installExtension taking only
an archive file name, which uses the new list_archive method to
determine the extension name and then hands off to the existing method.
Modify the existing overload to cope with the lack of server metadata
that occurs in this case, and to fill in a sufficient subset from common
information (i.e. the os/arch/revision of currently running Slicer) and
the description file provided in the extension archive.

This should allow users to install extensions from externally obtained
archives of the same (e.g. manually downloading from the server with an
external web browser).

Issue #2145

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23401 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add logging message for installed extension

Add helper to qSlicerExtensionsManagerModel to spit out info-level
logging messages from the same. Add such message on successful install
of an extension.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23402 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Show messages while installing extension file

Tweak extension 'install from file' logic to catch and display (via
QMessageBox) any messages reported relevant to the install process. This
includes errors and the success message added in the previous commit.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23403 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Silence unused parameter warning

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23404 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Reduced debug messages related to subject hierarchy

Didn't delete them, just commented out, so that they can be restored when debugging plugin ownership changes and other issues.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23405 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: move duplicated code into volumes logic

Both the Editor and LabelStatistics modules had code to check
that volume geometry matched for a label map.  The duplicated
code is removed and there is a test in LabelStatistics.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23406 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Made vtkMRMLVolumeNode::SetAndObserveImageData description more accurate

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23407 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Update python module external project to depend on setuptools

In an attempt to resolve #3757, this commit systematically adds setuptools
as a dependency to external projects building and installing python
eggs.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23408 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Ensure that easy-install.pth is not concurrently updated. Fixes #3757

Project that can NOT be built in parallel should set the
variable _EP_<projectName>_<lockname>_LOCK to 1.

For example, to address issue #3757 and ensure that project
building and python module are not updating the file 'easy-install.pth'
concurrently, these project are setting the variable:

    set(_EP_${proj}_SETUPTOOLS_LOCK 1)

Then, by calling the function "_ep_setup_lock", we are
sure that they won't be run in parallel.

Since "gitdb", "async" and "NUMPY" project are not updating easy-install.pth,
there is no need to "lock" them.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23409 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: fix the path to the ruler scene file for test

Pass the Input data directory via the CMakeLists file on the command line.
Avoids the hard coded path that assumes a specific directory name for
the Slicer source code check out.

Issue #3758


git-svn-id: http://svn.slicer.org/Slicer4/trunk@23410 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Shut-up CMake 3.0 warning for use of deprecated function by Teem

Waiting Teem gets ride of 'export_library_dependencies' and switches
to an export of targets, set policy CMP0033.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23411 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Disable VTK find_package/use_file_include in sub directory.

Calling "find_package(VTK)/include(${VTK_USE_FILE})" in both the top-level
directory and sub-directories is undefined. Indeed, If we include
VTK_USE_FILE (UseVTK.cmake) in the top level then it is probably adding
the autoinit definitions to the COMPILE_DEFINITIONS directory property.
Then that inherits to the sub-directory and could conflict with any such
property defined there. Thanks to Brad King for his insight.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23412 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Move most of find_package calls into each Slicer sub-project.

To help address issue #3741 [1], call to find_package associated to CTK,
DCMTK, ITK and SlicerExecutionModel have been moved in every Slicer
sub project, library or module expecting it.

This allows to reduce both the number of include directories and
the number of libraries passed to the compiler.

Moving forward, every Slicer sub project, library or module will be
responsible to call find_package (optionally specifying a list of
components) and (if it applies) include the associated "use file".

Note that call to find_package(VTK) is still done at the top-level, before
moving the call to the expected sub-directories, the CTKConfig.cmake
will have to be updated to call find_package(VTK) specifying the required
components where it is needed.

[1] http://na-mic.org/Mantis/view.php?id=3741

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23413 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Restore original behavior of vtkMRMLNode reference functions

This commit continues what has been started in r23395, it basically reverts
the logic handling reference to the implementation existing prior to r23192.

It reverts all the changes (r23192, r23196) that were done to be
able to set/get a reference at a position N. But it keeps:
 * the readability improvements to complete successfully. (r23193)
 * the transition to smart pointer simplifying the code (r23191)
 * changes done as part of r23192 and this commit fixing the
 following tests:
      - py_AtlasTests
      - py_CompareVolumes
      - py_SlicerMRBTest
      - py_RSNAVisTutorial
      - py_VolumeRenderingSceneClose
      - py_Slicer4Minute


It fixes "py_SubjectHierarchyGenericSelfTest" crash that is reported in
issue #3754 and was "related to MRML references. There are still one more
problem that is most likely related to the way SubjectHierarchySceneModel
deals with QModelIndex. See [1]

[1] https://www.assembla.com/spaces/slicerrt/tickets/598#/activity/ticket:

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23414 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Associate error message with MRML node attribute Get/Set/Remove func.

This commit removes the last assert from vtkMRMLNode implementation.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23415 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Fix BRAINSTools configure error related to missing ITKVtkGlue

Commit Slicer/BRAINSTools@94d53a64:

//---------------
COMP: Conditionally specify ITK component "ITKVtkGlue" to fix Slicer build.

This commit conditionally append "ITKVtkGlue" to the list of components
introduced in commit 2c751a5. Considering that (1) Slicer does NOT build
the module BRAINSConstellationDetector and ConvertBetweenFileFormats
depending on "ITKVtkGlue" and (2) Slicer does NOT build ITK with
module ITKVtkGlue enabled, this commit will ensure BRAINSTools can
be built within Slicer.

Ideally, every module should specify the list of ITK components it expects.

To find out which module depended on "ITKVtkGlue", assuming the source of
ITKv4 are in /path/to/src/ITKv5, the following one-liner has been used:

cd /path/to/src/BRAINSTools

for i in `ls -d */`; do \
  echo Directory [$i]; \
  ../ITKv4/Utilities/Maintenance/WhatModulesITK.py \
    ../ITKv4 $(find $i -type f) | ack -i ITKVtkGlue; \
done
//---------------

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23416 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Update dashboard driver to support customization using env variable

After a nightly or continuous dashboard starts, it not uncommon to
(1) first stop the script and then (2) manually edit the script and driver
script to skip the directory cleaning part and (3) finally, after
fixing something, relaunching the script.

This commit introduces the variable "run_ctest_with_disable_clean"
set to FALSE by default. It basically allows to explicitly disable the
cleaning step.

Finally, the macro "setOnlyIfNotDefined" has been updated to also
check if the variable name is set in the environment. For more details,
refer to the inlined comments. This will basically allow to restart a
nightly build without (1) cleaning the build directory
and (2) without having to edit the dashboard files.

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