ENH: Adding function to create a new WidgetRepresentation for a module

This can allow the user to "import" a module's GUI into another.
This is particularly interesting for work-flow modules.
The function getModuleGui can grab the existing GUI for the given module,
but the widget representation can only exist in one place. So when using
the GUI in another module with getModuleGui would cause one of the modules
to be empty.

From: Guillaume Sala <guillaume.sala@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22117 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Pass Slicer_PLATFORM_CHECK to inner build

Otherwise, if Slicer_PLATFORM_CHECK is OFF at the superbuild level,
the variable is not defined in the inner build, and automatically set to
ON by SlicerBlockPlatformCheck.cmake

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22118 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Adding new editor effect to perform WatershedFromMarker

From: Bradley Lowekamp <blowekamp@mail.nih.gov>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22119 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: gracefully handle case where SimpleITK is not available

On continuous builds and local developer builds SimpleITK is not
enabled by default, so we need to test for it and avoid raising
an error that prevents the module from loading.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22120 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: refer to mandatory parameters by index, no with flags (fixes 3184)


git-svn-id: http://svn.slicer.org/Slicer4/trunk@22121 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Build SlicerBaseCLI only if VTK is found.

This CMakeLists can be configured by projects others than Slicer
(e.g. TubeTK) that may not have VTK.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22122 3bd1e089-480b-0410-8dfb-8563597acbee
PERF: try to import SimpleITK at file scope

Repeatedly importing a library at function scope is less efficient
then  at the module level.

From: Bradley Lowekamp <blowekamp@mail.nih.gov>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22123 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: cast output to int16_t after watershed

Previously the output was being casted to uint16. Some editor effects,
such as the SaveIslandEffect don't behave correctly with this
unexpected image type. The output of the watershed effect is now
converted to int16 if needed.

From: Bradley Lowekamp <blowekamp@mail.nih.gov>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22124 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Revert "COMP: Build SlicerBaseCLI only if VTK is found."

This reverts commit 0692c63d8a06c912258e1f368a9a7c318cc0621a.

This revert is needed bacause CLIs in slicer builds failed to find
SlicerBaseCLI for linking (checked on Mac).

From: Steve Pieper <pieper@isomics.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22125 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Build SlicerBaseCLI only if VTK is found.

This CMakeLists can be configured by projects others than Slicer
(e.g. TubeTK) that may not have VTK.
This time (see r22122 and r22125), the condition on SlicerBaseCLI_SRC
is correct.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22126 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Export ExternalData.cmake macro in UserSlicer.cmake

SlicerMacroSimpleTest needs ExternalData.cmake to be loaded.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22127 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Propagate CTK renaming: ctkSpinBox to ctkDoubleSpinBox

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22128 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Compare Slicer bitness against extension bitness

On platform (i.e. Windows with Visual Studio) where it is possible to use
either a 32 or 64 bits generator, it is important to compare bitness
of Slicer project against project depending on Slicer (i.e. extension)
to ensure there are no mismatch.

The check could be disabled setting the variable Slicer_SKIP_CMAKE_SIZEOF_VOID_P_CHECK
to False before calling "find_package(Slicer)"

In case of mismatch, the configure will be aborted displaying a message
similar to this one:

// --------------------
CMake Error at C:/D/N/Slicer-1-build/Slicer-build/SlicerConfig.cmake:475 (message):
  Mismatch between bitness of 'Foo' and 'Slicer' project !

        Slicer_CMAKE_SIZEOF_VOID_P:8

        CMAKE_SIZEOF_VOID_P:4

  Reconfigure 'Foo' project using a compatible Generator.

  Generator used to configure Slicer was: Visual Studio 9 2008 Win64

  See http://www.cmake.org/cmake/help/v2.8.11/cmake.html#opt:-Ggenerator-name
// --------------------

Co-authored-by: Julien Finet <julien.finet@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22129 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Ensure NoExtensionSupport component can be specified

Before this commit, the UploadOnly targets were added also if extension
support was explicitly disabled.

This commit ensure that in any given extension, extension support can now
be disabled by either specifying the "NoExtensionSupport" component or by
setting the variable Slicer_DONT_USE_EXTENSION
(or Slicer_USE_NOEXTENSIONSUPPORT) to True.

The message indicating that extension support is disabled has been updated
to be more explicit.

Co-authored-by: Julien Finet <julien.finet@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22130 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: 3203. Fixed no pass label specified case. XML change is a workaround the bug 3202.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22131 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: ITK_EXPORT had no use

The defintion of ITK_EXPORT was empty in all cases

This has been identified since 2003 as not being necessary
for builds. see https://issues.itk.org/jira/browse/ITK-3110

On Windows builds that need exports, they must
be unique per library, and that is not controlled by CMake now.

The PrintSelfCheck.tcl was the only remenant need for
This patch, and that is no longer being used, so that
file as been removed.

The ITK_EXPORT define was set to nothing and had no
known remaining purpose.  It was removed to make the
over all code easier to understand.  There was,
understandably, a bit of confusion about the
need for this being pervasive in the code.

It is currently backwards compatible to have
this in code, but at some future point it will
be removed.

From: Hans Johnson <hans-johnson@uiowa.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22132 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Adding option for SimpleITK as a shared library

SimpleITK has large internal libraries, which take an extremely long
time to link on windows when they are static. Creating shared
SimpleITK internal libraries can reduce linking time. Also the size
of the debug libraries are monstrous. Using shared libraries for
debug, reduce disc requirements, and can improve linking
times. However, these shared libraries take longer to load than the
monolithic target from static libraries.

This commits updates the build system:
1) Propagate SimpleITK_DIR into Slicer config.
2) Add SimpleITK lib path to runtime library path for build.
3) Add SimpleITK to be installed as a cmake project.
4) Add CMake variable Slicer_USE_SimpleITK_SHARED to turn on SimpleITK
as a shared library.

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

From: Bradley Lowekamp <blowekamp@mail.nih.gov>

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