COMP: Update scripted module build macro to consider script specified without ".py"

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21760 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add option WITH_SUBDIR to slicerMacroBuildScriptedModule

Let's illustrate how the macro works considering a simple example. There
is a module named "Foo" having few scripts:

/path/to/Foo/TheFoo.py
/path/to/Foo/FooLib/a.py
/path/to/Foo/FooLib/b.py

First, let's set the following variables:

   DESTINATION_DIR =  <Slicer-build>/lib/Slicer-4.2/qt-scripted-modules
   INSTALL_DIR     = /path/to/Slicer/lib/Slicer-4.2/qt-scripted-modules

Two cases are now supported:

 * Default case:

     slicerMacroBuildScriptedModule(
       NAME Foo
       SCRIPTS Foo FooLib/a FooLib/b
       )

     Will be copied into DESTINATION_DIR / INSTALL_DIR:

          <DESTINATION_DIR|INSTALL_DIR>/TheFoo.py
          <DESTINATION_DIR|INSTALL_DIR>/FooLib/a.py
          <DESTINATION_DIR|INSTALL_DIR>/FooLib/b.py

 * WITH_SUBDIR case:

     slicerMacroBuildScriptedModule(
       NAME Foo
       SCRIPTS Foo FooLib/a FooLib/b
       WITH_SUBDIR
       )

     Will be copied into DESTINATION_DIR / INSTALL_DIR:

          <DESTINATION_DIR|INSTALL_DIR>/Foo/TheFoo.py
          <DESTINATION_DIR|INSTALL_DIR>/Foo/FooLib/a.py
          <DESTINATION_DIR|INSTALL_DIR>/Foo/FooLib/b.py

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

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21762 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add option WITH_GENERIC_TESTS to slicerMacroBuildScriptedModule

Instead of manually invoking "SlicerMacroConfigureGenericPythonModuleTests"
and then adding the associated scripts, specifying this new option
will auto-magically add the generic test.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21763 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Re-organize Scripted module directories

* Built-in scripted module are now organize like the extension. One folder
per module.

* Macro "slicerMacroBuildScriptedModule" is now used consistently.

* Generic tests are now added auto-magically with the help of the new
parameter "WITH_GENERIC_TESTS".

* Remove unused ChangeTracker tests and created an issue
on the extension tracker. See https://github.com/fedorov/ChangeTrackerPy/issues/13

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21764 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Move Editor icons from "Base/Logic" into "EditorLib/Resources/Icons"

Also introduced the python constant EditorLib.ICON_DIR allowing
to easily resolve icon filepaths.

The variable is set using the __file__ attribute of EditorLib module.

Since the file/directory organization of either (1) source code, (2) file copied
into the build dir or (3) installed files is the same, the ICON_DIR
variable will allow to resolve the icon file paths successfully.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21765 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Move "Slicer3Adapters.tcl" into "Python/slicer/tcl"

The historical folder GUI that was specific to Slicer3 had been removed
and "Slicer3Adapters.tcl" has been moved to a more suitable home. It is now
copied/installed as a python resources available within the python
directory.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21766 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Move Editor logic Cpp classes from "Base/Logic" to "EditorLib/Logic"

These classes implementing the logic associated with editor effects, it
make sens to move them along side the EditorLib module.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21767 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add option WITH_GENERIC_TESTS to slicerMacroBuildQtModule

Instead of manually invoking "SlicerMacroConfigureGenericCxxModuleTests"
and then adding the associated test, specifying this new option
will auto-magically add the generic tests.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21768 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add SlicerMacroConfigureModuleCxxTestDriver to simplify test configuration

This macro will take care of:
  - creating the test driver executable. Using "SOURCES"
  - setting the appropriate properties
  - optionally linking to additional libraries. If "TARGET_LIBRARIES" is passed.
  - optionally including list of directories. If "INCLUDE_DIRECTORIES" is passed.
  - enabling VTK debug leaks detection if "WITH_VTK_DEBUG_LEAKS_CHECK" is passed.

It can also return the list of test to run if "TESTS_TO_RUN_VAR" is set.

This macro will make maintenance of testing framework easier and more
consistent.

The other advantages is that the content of the CMakeLists.txt declaring
tests is simpler and easier to understand.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21769 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Update modules to use WITH_GENERIC_TESTS and SlicerMacroConfigureModuleCxxTestDriver

Overall simplification of the CMakeLists related to Testing.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21770 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: account for the new location of the FM filter


git-svn-id: http://svn.slicer.org/Slicer4/trunk@21771 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Update ITKv4 tag to ensure Slicer DCMTK libraries are used.

Warning: Since the ITK version will now be 4.4 instead of 4.3. It is
recommended that developers should make sure to remove "4.3" related
library from their build tree.
On macosx/linux, one way of removing the libraries would be:
  cd /path/to/Slicer-Superbuild/ITK-build
  rm -rf lib/*4.3*

This commit intend to fix issue detailed in both Slicer
issue 2883 and issue 2978.

In a nutshell, a link error like the following was occurring:

Linking CXX executable ../../../lib/Slicer-4.2/cli-modules/DTIimport
/path/to/Slicer-build/ITKv4-build/lib/libITKIODCMTK-4.4.so.1: undefined reference to `OFFilename::OFFilename(char const*, bool)'
/path/to/Slicer-build/ITKv4-build/lib/libITKIODCMTK-4.4.so.1: undefined reference to `OFFilename::~OFFilename()'
collect2: error: ld returned 1 exit status
make[5]: *** [lib/Slicer-4.2/cli-modules/DTIexport] Error 1

In that specific case, the CMakeCache of ITK build was referencing
the wrong dcmdata library:
DCMTK_dcmdata_LIBRARY:FILEPATH=/usr/lib/libdcmdata.so

... whereas it should have been:
DCMTK_dcmdata_LIBRARY:FILEPATH=/path/to/Slicer-build/DCMTK-install/lib/libdcmdata.a


ITK commit 31bc608a [1] updated Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
so that default path are explicitly ignored when looking for DCMTK libraries.
This will ensure that the DCMTK library built by Slicer will be used.

The option NO_DEFAULT_PATH associated with the command "find_library" [2] is
now used.

Let's also note that the other "FindDCMTK.cmake" modules available in ITKv4
haven't been fixed and could lead to similar similar issue [3][4]. As of today,
this is probably not an issue within Slicer. Indeed, ITK is not built with
GDCM support and DCMTK seems not be used within VNL. (It means the associated
DCMTK cmake files should probably be removed.)

See http://www.na-mic.org/Bug/view.php?id=2883 and http://www.na-mic.org/Bug/view.php?id=2978
Fixes #2883 and #2978


[1] https://github.com/Kitware/ITK/commit/b9c473e241d46bc79d6750ffae73a112b0dcae7c
[2] http://www.cmake.org/cmake/help/v2.8.10/cmake.html#command:find_library
[3] ./Modules/ThirdParty/VNL/src/vxl/config/cmake/Modules/NewCMake/FindDCMTK.cmake
[4] ./Modules/ThirdParty/GDCM/src/gdcm/CMake/FindDCMTK.cmake

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21772 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: allow LabelEffect subclasses to selectively disable some features

Paint Over and Threshold options may not be possible to implement
for some label effects, so make it possible for the subclass to disable
display of the widgets.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21773 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Update system to use CMake built-in macro "cmake_parse_arguments"

SLICER_PARSE_ARGUMENTS has been kept around but will display an error
message if it used by some extension. That will give the opportunity
for extension maintainer to update their CMakeLists.txt.

Considering that the file "CMakeParseArguments" is also included in the
code base associated with Slicer 4.2.2-1, simply updating the extension
so that "cmake_parse_arguments" is used will be sufficient. Say differently,
CMakeLists.txt maintained for both extension build against Slicer nightly
and Slicer 4.2.2-1 won't diverge.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21774 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Fix warning "Slicer_BUILD_SkullStripper" is unused.

The option has been added by r18797, then when SkullStripper
has been converted to be a regular extension (r20088) the variable
"Slicer_BUILD_SkullStripper" should have been removed from SuperBuild.cmake.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21775 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Change "SuperBuildExtensionTemplate" layout to support addition of modules.

* The new template has been reorganized to easily support the addition of
new modules.

* Folder has been removed from "SuperBuildLoadableExtensionTemplate" to "SuperBuildExtensionTemplate"
to better reflect the role of the template.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21776 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: implement #2206 and #2983

Since the browser is raised when the module is entered, people
naturally think that pressing the button that enters the module
will also open the browser; but when the module is already active,
selecting the module is a no-op and the browser is closed.

With this change, the action will also raise the browser when
the module is active, so it conforms with expectations.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21777 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: fix a warning message when dicom file has been deleted

The Recent Activity widget now gracefully handles the case where
files have been deleted that are referenced in the database.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21778 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: print a stack trace when a dicom plugin fails to execute

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