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
STYLE: dashboarddriver: Update macro setOnlyIfNotDefined to display info

This commit updates the macro "setOnlyIfNotDefined" to display the
environment variable value (introduced in r23417) if it has been set.

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