COMP: On MacOSX, waiting issue #3741 is solved uses VTK 5.10

As illustrated in the bug report [1], the maximum number of linked libraries
is reached  on MacOSX 10.6 (see below for an example of message) but there
are no problem on MacOSX 10.8 (at least when targeting 10.9).

// ---------
ld: warning: duplicate dylib /path/to ...
[...]
ld: warning: duplicate dylib /path/to ...
two level namespace mach-o files can link with at most 253 dylibs, this link would use 287 dylibs
// ---------

Waiting we come up with a solution or understand better the scope of the
problem, this commit force the VTK version to 5.10.

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

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23344 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fixed bug with respect to Image inhomogeneity; included vtkImageLabelPropagation in SlicerCommonInterFaceTest1 so it would fail as this is also the reason for EMSegCL_Task_MRIHumanBrainFullParcellation_BRAINS_small failing

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23345 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Fix 80 char limit in vtkMRMLDiffusionTensorVolumeDisplayNode

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

* The nrrd reader did not properly propagate the scalar type to the
pipeline on time.
* vtkTeemEstimateDiffusionTensor did not use a proper pipeline of filters
for the baseline and averagedwi outputs.

Fixes DWIToDTIEstimationTest and DiffusionTensorScalarMeasurementsTest

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23347 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix vtkITKImageToImageFilter for VTK 6

The pipeline of filters was broken.

Fixes DiffusionWeightedVolumeMaskingTest

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23348 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fixes auto level for DTI images

* CalculateAutoLevel was not called in VTK 6 when the image was modified
* CalculateAutoLevel was aborting with Diffusion tensor display node
because the scalar image data did not have a Scalars array
* Also use GetDisplayScalarRange() in qSlicerScalarVolumeDisplayWidget

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23349 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Specify minimum set of VTKv6 libraries. Fixes #3741

The VTK utility: Utilities/Maintenance/WhatModulesVTK.py discovers
which modules are used in a project. This patch modifies the Slicer
CMakeLists.txt file to only load the vtk modules used by Slicer. This
should reduce the number of libraries being linked.

This commit also updates CTK project including a patch reducing
the number of library associated with CTKImageProcessingITKCore library.

// ----------------
$ git shortlog 48ef9aeb8..282abc7 --no-merges
Jean-Christophe Fillion-Robin (1):
      CTKImageProcessingITKCore - With ITKv4, link only to the required libraries
// ----------------

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

From: Bill Lorensen <bill.lorensen@gmail.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23350 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: SlicerExecutionModel - Update to explicitly support ITKv4

//-------------
$ git shortlog 865e2a771..ecb58ad --no-merges
Jean-Christophe Fillion-Robin (1):
      COMP: Update GenerateCLP and ModuleDescriptionParser to use ITKv4
//-------------

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

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23351 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Re-enable VTKv6 on MacOSX.

Since following commit r23350, issue #3741 is resolved, this commit
re-enables VTKv6 on MacOSX.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23352 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: On MacOSX, waiting issue #3741 is *really* solved uses VTK 5.10

It turns out that the test build I initiated managed to go way beyond
the original stopping point [See r23344]. That said, there are still
the same issue when building SubjectHierarchy, Annotations module ...

This commits reverts back to VTK 5.10 for MacOSX.

The solution gonna be to continue the work initiated in [1] and
remove the top level call to "find_package()" and instead have
every Slicer libraries/modules including his set of direct dependencies.

[1] http://massmail.spl.harvard.edu/public-archives/slicer-devel/2014/015671.html

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23353 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: FiberBundleLabelSelect - Clean up CMakeLists.txt

This commit removes reference to empty variable vtkTeem_LIB_DIR, additionally
vtkTeem being a target this is not needed.

Change *_(BINARY|SOURCE)_DIR with their *_INCLUDE_DIRS equivalent

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23354 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Find LibArchive/CURL/OpenIGTLink/ZLIB package where required.

This commit complements commit r23350 and will help reducing the number
of parameters passed to the compiler/linker. See #3741

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23355 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Find qRestAPI package only where required.

This commits moved the discovery of the qRestAPI module in both QTCore
library and DataStore remote module.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23356 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Fix build error related to missing curl/curl.h

This commit fixes build error introduced by commit r23355 by moving the use
of "curl/curl.h" into the private implementation. That way, it won't be
required for user of the "vtkHTTPHandler" class to know about CURL, it
will be an implementation details.

Build error were occurring only windows because curl wasn't installed on the
system and the header wasn't found in default location.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23357 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Fix "RCC No resources warning" by removing empty resource files.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23358 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Do not update scalar image pipeline if there is no input image

That would generate pipeline errors with the diffusion tensor display node.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23359 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Ensure PreventDirWithSpaces CMake variables is passed to inner project.

This commit ensures that spaces can be used in either source or build
directory when configuring Slicer inner project. This is done by passing
down the variable ${PROJECT_NAME}_SKIP_DIR_WITH_SPACES_CHECK

This commit also documents and simplifies usage of
"PreventDirWithSpaces" CMake module.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23360 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Consider inner build dir when checking for max root directory length.

This commit introduces the convenience CMake module "PreventDirWithTooManyChars"
and update code to account for length of the inner build subdirectory.

It means if the maximum length of the top-level build directory is 40,
assuming the inner build directory is "Slicer-build", the check in
the inner build will expect a path of length 53.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23361 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Ensure variable expected by fixup script are set.

This commit fixes a regression introduced by commit r23355 moving
call to find_package where they are needed. By moving the find_package call
from the top-level CMakeLists.txt, variable exepcted by fixup script were
not set anymore.

It updates SlicerCPack to call find_package and ensure
variables *_LIBRARY_DIRS expected by the fixup script are set.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23362 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Remove pipeline error in VTK6 with DiffusionTensorDisplayNode

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