ENH: In response to numerous constructive critisms of the newly added suite of BRAINSTools, a code review was performed in order to make the applications work consistenently and with similar user interfaces.
Summary of ChangeLog:
-Instrumented xml files so that moving images are properly associated with their transforms in the Slicer3 MRML Interface.
-Made command line arguments consistent across tools for specifying images, transforms, similar parameters.
-Hid many advanced command line arguments from standard user interface when used from Slicer3
-Improved documentation of command line arguments to describe better what the intended purpose, and restrictions on use are.
-Added common set of image resample/warping options across all tools so that all tools provide common interface for choosing outputPixelType and interpolation mode
-Fixed reading and writing of transforms to use a common read/write paradigm, to be consistent across all tools, and to be compatible with Slicer3 (i.e. Write out Bspline transforms with the bulk transform given second).
-Increased code coverage by merging common functionality that existed in each tool separately into the BRAINSCommonLIb, thus removing code, and ensuring that exactly the same behavior was done across all tools.
-Worked around bug where ITK LSBFGSB optimizer does not properly return the number of iterations performed, This improperly reported that Bspline registrations were never done when doing a Bspline registration alone.
-Improved source code documentation for commonly used functions.
-Removed obsolete code to improve code coverage
-Added feature to BRAINSResample that allows grid lines to be created in the image. ENH: Made test cases more tolerant of slight image difference due to numerical precision.
-Fixed bug in BRAINSResample regarding the output image type

BUG: update the gui with the default label map colour node when create it, and update it with the passed in node in the Enter method (called from Edit Properties). Changed the selection warning to a debug, it's not user friendly.

BUG: pass in a test mrml file to the acpc test. The file does get over written when the test is run, but only the first node changes. The second node, vtkMRMLLinearTransformNode2, contains the expected output

BUG: Trying to fix test. TODO: find last of memory leaks from tcl test. Can't use the regular compare since this outputs a .vtp file, and the cmake compare command doesn't work because Slicer3 doesn't work with the execute_process command as it keeps breaking the pipes

BUG: cleaning up memory leaks, trying to fix test. TODO: find last of memory leaks from tcl test. Can't use the regular compare since this outputs a .vtp file, and the cmake compare command doesn't work because Slicer3 doesn't work with the execute_process command as it keeps breaking the pipes

BUG: changing 'Tumor Mask' to 'VOI Mask' as per Ron's request, fixing bug in computing that was tabling results for VOIs with no voxels in them, and tried to address warnings in Logic from gdcm (i think it worked...)

BUG: avoid slowdowns when using editor paint tools by turning off corner annotations for 300ms on every mouse move. Use unified set of methods in the superclass (SWidget) so that additional cases can be added if needed for performance (such as turning off fiducial labels)

BUG: avoid calling updates on the event queue, even if only to provide feedback to the user. When called from inside progress events or other inner loops this can lead to recursive invocations of the event loop and bad byproducts

BUG: selecting presets should update volumes GUI (win/lev/thresh range widgets) via a direct call to method UpdateFramesFromMRML() on the VOlumesGUI. This had been a private method, so I had to expose it.

BUG: Add locally modified box spatial object to resolve mantis 789.
This is to workaround using an unstable version of ITK for this one
fix. This should be reverted when ITK is updated (to the release after 3.18)

BUG: return const references to the internal members of the structure so that when accessor methods return c_str const char pointers to the strings they will point to valid memory (without the references a copy of the string is created on the stack and it goes out of scope when the accessor method returns)

BUG: bring the angle gui and node into line with the ruler (bug 775): display the angle, moved elements around, added support for coloured handles (use the spheres to support this better). BUG: fixed the click to place issue with a little hack, still need to trigger updating when load a scene with new colours on end points.

COMP: massive improvements corresponding to a breakthrough discovery that you must configure build and install tcl/tk from with the unix dir of the source tree and not the root or certain files (tkConfig.sh && tclConfig.sh) may not be correctly generated.

BUG: deal with active viewer widget being null and then not (solves problems with loading a mrml scene and getting crashes since was turning it on before interactor set, and when close scene the viewer widget is set to null

BUG: Added missing OpenIGTLink directory to Slicer3SetupPaths.bat (the problem was that modules that relied on OpenIGTLink were not displayed in the module list when Slicer was started by running Slicer3SetupPaths.bat & Slicer3-real.exe)

ENH: SlicerQt: qMRMLSceneModel had hierarchies in column != 0. Support the case when a node is added to the scene without NodeAboutToBeAdded. When the mrmlscene is not set, disable the combobox and don't add the ExtraItems.

BUG: added a lot of error checking and breaking loops when find errors. When reading in a color file, check that the max id is < 1 million to try and avoid parsing text files and getting huge max id values

ENH: A portable library to watch directories for file addition, modification and deletion. Currently it uses Win32 ReadDirectoryChangesW for monitoring changes in Windows, and inotify in linux. OSX is supported via kqueue and directory scans.
Written by James Wynn
Contact: james@jameswynn.com
The most recent version can be located at:
http://simplefilewatcher.googlecode.com
Formatting modifications, directory organization and CMake support by Bill Lorensen. The original API is intact.

ENH: adding a test to load a color file, add it to the scene, save the scene, clear the scene, then load the scene back in. also loads a test volume and assigns it the new color node if the volumes logic exists

ENH: Add support for creating a fixed image region of interest from a slicer ROI input.
This adds a helper function in ConvertSlicerROIToRegion.h that creates an itk::ImageRegion from two points and an image base.
A test class is provided.

ENH: vtkRegisterImage...Configure.h.in include vtkSlicerConfigure.h, but it wasn't needed. Libraries and execs linked with MRML, but only needed ITK_LIBRARIES. These changes allow this module to be compiled outside of Slicer.

ENH: Updated Superbuild script - Added PythonQt support. Also added more comments.
Note also that BUILD_SHARED_LIBS is noew forced to ON
On windows, make sure you installed a patch program.
Otrherwise, pythonQt won't be built.

ENH: SlicerQT - Added Base/Python directory containing a set of python script loaded by the python shell.
slicerqt.py is the main script that should be executed by the python shell.
The scripts logic.py, mrml.py, remoteio.py, teem.py, freesurfer.py will
take care of loading the vtk libraries wrapped in python.
All the script will also be pre-compiled and copied in {Slicer_home}/bin/Python

ENH: SlicerQT - Added option qCTKWidgets_WRAP_PYTHON to qCTKWidgets/CMakeLists.txt
If this parameter is set to True in some top-level CMakeLists including CTK,
the script will attempt to find PythonQT.
After PythonQT is successfully discovered, the variable:
qCTKWidgets_WRAP_PYTHON
qCTKWidgets_PYTHONQT_INCLUDE_DIR
qCTKWidgets_PYTHONQT_LIBRARIES
will be added to the cache. It means that other these variable will be
visible in other sub-project (for example qVTK and qMRML)

ENH: SlicerQT - Added widget qCTKPythonShell and object qCTKAbstractPythonManager to CTK.
qCTKPythonShell imported from paraview, provided an interactive "shell" interfaced
to an embedded Python interpreter.
qCTKAsbtractPythonManager provded convenient method to interact with PythonQt singelton.
The method 'pythonPaths' should be overloaded to return a list of path
containing the different wrapped python libraries.
The method 'preInitialization()' should be overloaded to, for example, add decorator
or register call with PythonQt
the signal 'Initialized' could also be used to trigger the registration of
additional decorator and object.

BUG: SliceControllerWidgets in Slices module were not connected to a Slice node on scene load. (Actually they were connected and end up getting disconnected. Now watch scene load events to rewire the Slices module.) Also fixed changing the compare view settings and having the Slices module update the number of controllers.

ENH: Added the "visibility" attribute to View nodes to control their visibility in the main Slicer window. For a short time the HideFromEditors property was used for the same purpose, but it is more appropriate to have a separate attribute for this.

BUG: Fixed problem of having empty 3D viewer window when an old MRML file is loaded. The root cause of the problem was that before Slicer revision 10795 the View node was hidden from editors by default.

ENH: Don't show a vtkMRMLViewNode in the base Slicer GUI if the node's HideFromEditors property is true. This feature is necessary for displaying a private 3D view in a separate window (base Slicer GUI has to be prevented from displaying the same node in an other view, because having multiple view widgets for one view node cause infinite loop during rendering).

BUG: SlicerQT - Since the parameter '--' is 'swallowed' by Slicer3 tcl launcher - Let's disable test qVTKCommandOptionsTest7
On windows platform, the parameter '--' is interpreted and not passed to the real
Slicer3 or SlicerQT executable.
See http://www.tcl.tk/man/tcl7.6/UserCmd/wish.1.html

ENH: SlicerQt - add a new widget: qCTKDynamicSpacer that has a dynamic size policy depending on the activate slot.
This could be usefull when you want the size policy of a spacer to depends of some conditions.
Example: one wants the spacer to take no space when a collapsible button is expanded. but when the collapsible button is closed, you want the spacer to be expanded.

BUG: SlicerQt - qSlicerModulePanel. Change sizePolicy for the Help Panel. Give a stretch to 1 to the modules
Some modules want to take as much space as available, but when they are closed, you want the spacer to take all the space to stack up the help and module section on top of the module panel. this is why we give a stretch to 1 for the module
The Help section doesn't need to grow, nor to be shrinked, its sizehint should be respected: set the vertical policy to Fixed

ENH: SlicerQt - add a tracking property to qCTKSliderSpinBoxWidget
When tracking is ON: valueIsChanging() and valueChanged() are fired anytime the slider or the spinbox are modified
When tracking is OFF: valueIsChanging() is fired anytime the slider or spinbox or modified. valueChanged() is only fired when the mouse button used to modify the value on the slider or spinbox is released

BUG: fixing a null pointer problem: if volumes are added to a timeseries before the bundlenode is created, slicer crashes. In this fix, we check whether the node is NULL, and if so, a new node is created before assigning values to it.

BUG: SlicerQT - In FiducialTractographySeeding module UI, the ShowHidden was set to False whereas the HideFromEditor property from the node was set to true.
That explains why the node wasn't visible after the user clicked on the Add button.
Note: We will add a developer warning in case the NodeType associated to the nodeSelector
corresponds to a node with HideFromEditor set to true.

BUG: removed the filename-based heuristics applied in CalculateStatisticsAutoLevels method -- this addresses mantis bug 716. A smarter way to apply color luts and win/lev/thresh should be used here. Marked the location in code with comment recommending different treatment (I believe only QueryAtlas was using this method.)

COMP: compilation error on Windows, qVTKObjectTest doesn't need to be exported (only used in local).
the export macro was wrongly used, the Testing project was not correctly configurated to use this macro. A new macro (and associated qVTKWidgetsTestingExport file) should have been created specially for this class. However the scope of this class is only local, this is why we removed it.

BUG: remove manual call to ProcessReadData since it should be automatically triggered by the vtkSlicerApplicationLogic and shouldn't need to be called from the test. Also add error message if data read times out

BUG: The GUICallbackCommand of vtkSlicerCamerasGUI was not destroyed when the cameras module was destructed.
This leaded into a crash when a vtkMRMLCameraNode was throwing an ActiveTagModifiedEvent. The callback tried to call access the already destroyed module.

COMP: remove MRIBiasFieldCorrection as it is now a command line module (see Applications/CLI). The duplication of this module caused a crash when closing Slicer because MRIBiasFieldCorrection was deleted twice. Julien suggested that a better fix would be in the Slicer deletion mechanism since deletion should not be based only on the name/title of the module.

ENH: SlicerQt - Refactorization in qVTKObjectEventsObserver, qVTKConnections and qVTKObject
As it has been decided that only 1 class should have the QVTK_Object macro, only 1 instance of qVKTObjectEventsObserver is needed. The inherited classes can access it normally.
qVTKObjectEventObserver doesn't need to have a parent set to be working, remove it.
There is no recursion needed to block connections.
Rename qVTKConnection::Establish into qVTKConnection::setEnabled
Use lowercase for the first letter of the methods in qVTKConnection
Refactorize the loops over the connections (now use QList<qVTKConnections> findConnections())
Move some private implementations into the pimpl.

BUG: Fixed launcher error (non-QT Slicer doesn't start because missing QT paths)
ENH: All launcher scripts are in procedures and errors are captured and properly reported (more robust to any script error)
ENH: New launcher option (--no-error-popup) to not display errors in a popup (log only)
ENH: Use --no-error-popup for EMSegment tests that are expected to fail (to not confuse the user with error popups)
ENH: Added new slicer variable (::LAUNCHER_REPORT_VTK_ERRORS) to allow reporting of VTK errors as failed tests on the dashboard. By default it is turned off now. Set it to ON to capture more errors.

ENH: SlicerQt - Add the "decimals" property to qCTKSliderSpinBoxWidget. The number of decimals was previously set by setSingleStep. We want to let the user decide how many decimals to display.
Note: the number of decimals to display impacts the value of qCTKSliderSpinBoxWidget:
Example:
setDecimals(1);
setValue(32.578);
value() == 32.6 and not 32.578

ENH: SlicerQT - Add method 'tempDirectory()' to qSlicerCoreCommandOptions.
Return temp directory
Try to read the value from the setting, if no value is found it defaults to
the value returned by QDir::tempPath()
See http://qt.nokia.com/doc/4.6/qdir.html#tempPath

ENH: Update launch.tcl.in - Added the QT_BINARY_BIN to the path, Added options "--designer"
There are now the following way to start Qt Designer:
./Designer.py
or
./Slicer3 --designer
or
./Slicer3 --launch NAME_OF_QT_PROGRAM
NAME_OF_QT_PROGRAM could designer (linux), Designer.app (Darwin) or
any qt executable located in QT_BINARY_DIR)

BUG: since Modules can be linked with a separate Logic library. Let's make sure the TCL_init function of the logic library is called.
That is achieved by adding to the GUI header:
// Had to add this to force loading of these support libraries
// Only libraries with entries that will be dynamically called from TCL need to be instantiated
#include "vtkTcl.h"
extern "C" int VtkslicerLOGIC_NAMEmodulelogic_Init(Tcl_Interp *interp);
where LOGIC_NAME should be uppercase.
And the following to the constructor of the GUI:
// Try to load supporting libraries dynamically. This is needed
// since the toplevel is a loadable module but the other libraries
// didn't get loaded
Tcl_Interp* interp = this->GetApplication()->GetMainInterp();
if (interp)
{
VtkslicerLOGIC_NAMEmodulelogic_Init(interp);
}
else
{
vtkErrorMacro("Failed to obtain reference to application TCL interpreter");
}

ENH: New property in qCTKSliderSpinBoxWidget: AutoSpinBoxWidth
The qCTKSliderSpinBoxWidget is an association of a QSlider and a QSpinbox. When the widget is added into a layout with other qCTKSliderSpinBoxWidgets, the spinboxes were not aligned if they have a different max number of figures to show.
When AutoSpinBoxWidth is true, the width of the qCTKSliderSpinBoxWidget QSpinBoxes of the same parent are synchronized. The max width is used.

COMP: SlicerQT - launch.tcl.in is now configured to properly add QTLoadableModule, qCTKWidgets, qVTKWidgets and qMRMLWidgets libraries to the current process library path. QT_PLUGIN_PATH is also set properly.

BUG: SlicerQT - In qSlicerCoreApplication, now using auto_ptr to store the reference to CoreCommandOption, coreIOManager and ModuleManager.
Updated the associated test, coreCommandOption wasn't created nor assigned to
the qSlicerCoreApplication.

BUG: SlicerQT - QTCLI - Since the pimpl was a subclass of qSlicerWidget, calling this->mrmlScene() within
the Pimpl was returning 0. Changed qSlicerWidget into QObject to keep
the possibility of adding signal/slot and use QCTK_P to access the associated public
interface.
STYLE Also clean code and renamed updateMRML function into updateMRMLCommandLineModuleNode

ENH: SlicerQT - Updated qSlicerCoreApplication and qSlicerApplication to make use of qCTKSettings and qSlicerCommandOptions classes.
The method initialize now requires the parameter passed by reference: exitWhenDone.
If exitWhenDone is set to True, the user of qSlicerCoreApplication or qSlicerApplication
is responsible to exit the application.
This parameter is set to true when the application should exit before
it starts the event loop. For example, when the parameter: --version or --help
are added to the command line, the application should execute the corresponding
function and exit.
Added method 'settings' to qSlicerCoreApplication, internally this method
will instantiate the application settings is not already done.
The setting filename is generated using the ApplicationName (ie Slicer),
the organizationName (ie NAMIC), the minor and major version.
In qSlicerCoreApplication, the method 'disableSettings' will instantiate a new setting object, this
time the setting filename is the same + a suffice (ie "-disabled").
In qSlicerCoreApplication, the method 'handlePreApplicationCommandLineArguments'
query the its associated commandOptions object to start the appropriate action.
All non-gui related logic should be added in that method. Calling 'terminate()'
allows to set the ExitWhenDone flag to true, this former one is checked
just after initalize finishes. If True, the application exit.
Application/SlicerQT/Main.cxx has been updated to consider the NoSplash option.

ENH: SlicerQT - Added qVTKCommandOptions allowing to handle command line parameter in a standard fashion.
Note that this class is made to be subclassed. That way the method:
intialize, disableCurrentSettings, wrongArgument, deprecatedArgument
could be overloaded
An interesting aspect is that the class is also working with QSettings,
For example:
In settings file, there is the following property: tmpDir=/tmp
class MyAppCommandOptions: public qVTKCommandOptions
{
public:
QString TmpDir;
QString tmpDir();
void initialize()
{
Superclass::initialize();
this->addArgument("--temp-dir", 0, &TmpDir, QDir::tmp())
}
...
}
bash$ bin/SlicerQT --temp-dir=/home/mytmp
At run-time the application will be using the specified directory. In other
word the function .. options->tmpDir() will return "/home/mytmp"
Then, next time the application is restarted .. if no option is given,
the tmpDir() method will return the value stored in the setting file.
The following two parameters are available by default: --help and --disable-settings
--help will show the different available arguments
--disable-settings will call the virtual method 'disableCurrentSettings'.
The derived class a responsible to disable the settings. A possible way
could be to instanciate a settings object using a filename + '-disabled' suffix.
That way ... no parameter will be used.

ENH: SlicerQT - In qSlicerApplication, rename non-member function from qSlicerPalette to qSlicerApplyPaletter
The qSlicerPalette didn't describ what the function was made for.
Also added some comment to qSlicerWidgetPlugin

ENH: SlicerQt - apply the StyledPanel to all the qCTKCollapsibleButtons. Make it by default in the designer.
Warning, setting StyledPanel by default in the designer (via qCTKCollapsibleButtonPlugin) doesn't mean that the widget is created by default with a frame.
If you instance the widget programatically, then you should then call: setContentsFrameShape(QFrame::StyledPanel).

ENH: SlicerQt - In QCleanlooksStyle, the frame in qCTKCollapsibleButton doesn't seem to "touch" the button.
The style of QCleanlooksStyle (like many other styles) have an extra border around buttons. This extra border creates a discontinuity between the button and the frame which result in a "confusing" look of qCTKCollapsibleButton. To fix it, we hackily remove that space.

COMP: Update CMake/DiscoverSystemNameAndBits.cmake to correctly set Slicer3_BUILD on Darwin
Note: CMAKE_SYSTEM_PROCESSOR MATCHES was compared to 'Intel', it seems this
value isn't valid. 'powerpc' is used instead.

BUG: Save and restore the URL and root directory of the MRML scene before importing the MRML files associated with command line module presets. Without this fix the last set of presets that were imported would be come the default directory and filename for saving the scene.

ENH: SlicerQt - add a new class - qMRMLSceneFactoryWidget - that combines qMRMLSceneGeneratorButton with qMRMLNodeFactoryButton.
The new widget contains buttons to create/delete a vtkMRMLScene and create/delete vtkMRMLNodes.
qMRMLSceneFactoryWidget main purpose is to test other qMRMLWidgets, in the Designer (clicking on the buttons) or in unit tests (by calling slots directly).

BUG: SlicerQt - In qVTKConnection::Execute(), if qVTKConnection is deleted in emitExecute, the removeConnection() call would access deleted data.
emitExecute() could delete the qVTKConnection object if it does a removeConnection (via qVTKReconnect).
qVTK::Execute() already deletes itself, we don't want anyone else to delete it in the emitExecute.
Stack example:
qVTKConnection::Execute
+emitExecute()
| +qVTKObjectObserver::qVTKReconnect()
| +qVTKObjectObserver::removeConnection()
| +delete connection
+delete connection
-> connection delete twice
We don't want to delete the connection in the first place.
This is why we use a AboutToBeDeleted flag.

ENH: SlicerQT - Updated SlicerQT/CMakeLists.txt, so that SlicerQT-forward executable will also include 'Slicer3_INSTALL_MODULES_BIN_DIR'
Indeed, since SlicerQT is linked against Modules/.../Logic, this path
has to be added.

COMP: SlicerQT - For now, launcher 'Slicer3' (based on startkits) is also configured if Slicer3_USE_KWWidgets is OFF.
Required to be able to run SlicerQT on a windows build.
./slicer3 --launch SlicerQT
Some test also expect the launcher 'Slicer3' to be present. (for example VTKITKReader)
On windows, the launcher is mandatory to run the test.

COMP: CMakeLists.txt - Loop though the Modules/XXX/Logic only if Slicer is build with Slicer3_USE_KWWIDGETS OFF
That means that the Logic subdirectory should be included in the CMakeLists.txt
specigic to the Module.

COMP: If a Logic directory exists in a modules directory, the directory will be automatically added.
The process allowing to build the 'Logic' library of a module had been factorized out.
That way the dedicated libray is build and both the QTModule and the regular Module can link against it.
There is not need to add Win32 header file or any configure header.
Using the macro Slicer3_build_module_logic automatically configure a file
of the form ${PROJECT_NAME}Export.h.
For example vtkSlicerTractographyModuleLogicExport.h where
name of the project is 'vtkSlicerTractographyModuleLogic'
Note also that the Logic sub-directory should *NOT* be included in the module
main CMakeLists.txt
As a convention, the module logic library should composed as described below:
vtkSlicer[MODULE_NAME]ModuleLogic

COMP: Update the main CMakeLists.txt script - Slicer3Version.txt.in is
now configured and installed in to Slicer_HOME/lib/Slicer3 at build time.
The following variable are discovered at build time:
Slicer3_BUILD -> Computed using CMake/DiscoverSystemNameAndBits.cmake
Slicer3_BUILDDATE -> Computed using macro TODAY from CMake/Slicer3TodayMacro.cmake
Slicer3_WC_URL -> Computed using either macro Subversion_WC_INFO (if slicer checkout using svn)
or Git_WC_INFO (if slicer is checkout using git-svn)
Slicer3_WC_REVISION -> idem

COMP: Added cmake script allowing to obtain the current name of the system.
After the script is included, the variable Slicer3_BUILD containing
will be available and should contain on of these value:
solaris8,
linux-x86
linux-x86_64
darwin-ppc
darwin-x86
darwin-x86_64
win32
win64
and Slicer3_BUILD_BITS either "32" or "64"

COMP: Added cmake macro TODAY allowing to obtain the current date in cross-platform fashion.
Use:
include(.../Slicer3TodayMacro.cmake)
TODAY(MyDate)
MyDate will be of the form: YYYY-MM-DD
Note: Should work on windows and unix-like platform

COMP: Add FindGit.cmake to Slicer3/CMake
Within a CMakeLists.txt script, it's now possible to include git:
FIND_PACKAGE(Git)
If Git executable is found, the macro Git_WC_INFO is available.
Use:
Git_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} Slicer3)
Then, the following variable are set:
Slicer3_WC_REVISION_HASH
Slicer3_WC_REVISION_NAME
and if git-svn is used:
Slicer3_WC_REVISION
Slicer3_WC_LAST_CHANGED_AUTHOR
Slicer3_WC_LAST_CHANGED_REV
Slicer3_WC_LAST_CHANGED_DATE

COMP: Usefull script allowing to convert header file following that comment style:
// Description:
// Text of the desc
to
//
// Text of the desc
Note also that all single comment staring with '//' will be converted to '///'

ENH: SlicerQT - ModuleFactories are now registered with a ModuleFactoryManager
The class ModuleFactory has been removed and most of its behavior has been
transferred to ModuleFactoryManager.
The different module factories are now:
- CoreModuleFactory
- LoadableModuleFactory (for QTModules)
- CLILoadableModuleFactory
- CLIExecutableModuleFactory
- CLIPythonModuleFactory (not yet added ..)
The library dependencies have been updated from:
QTBase -> QTCLI ---------> QTCore -> QTGUI -> qSlicerQT -> SlicerQT
| |
-> QTCoreModules -----|
to
QTBase -> QTCore -> QTGUI -> qSlicerQT -> SlicerQT
| |
-> QTCLI ---------|
| |
-> QTCoreModules --|
Method {initializeLoadable,CmdLine}ModulesPaths have been removed. Their
existing behavior has been added to:
- qSlicerLoadableModuleFactory::modulePath
- qSlicerCLIModuleFactoryHelper
The former is used by the CLI factories.
The moduleFactoryManager provides methods that allow to register/instantiate
module based on the factoryName. The factoryName corresponds the the name used
to register the factories using 'registerFactory' method. The preferred name
for a factory is its className.

ENH: SlicerQT - Added virtual method 'registerItems' to qCTKAbstractFactory
These method could be overloaded in subclass to provide the same method
accross multiple factories. For example, having a collection of factories,
it would be easy to register the items for each one of them. (polymorphism)

BUG: SlicerQT: Remove the QLabel from qCTKSliderSpinBoxLabel, it was more confusing than anything else. qCTKSliderSpingBoxLabel was using qCTKSlider that was containings some bugs (because it was deriving from a QSlider. We now use qCTKDoubleSlider. We also connect the qMRMLLinearTransformSliders using the valueChanged signal instead of sliderMoved signal (sliderMoved should be used only when Tracking is off, and a specific behavior should happen when the user manually moves the slider.

COMP: Fix various compilation warning (hidden virtual method, unused variable, ...)
Note1: Also moved vtkSlicerApplication.h up in the header include order
otherwise, when compiled with QT, it outputs that message:
#error qdatastream.h must be included before any header file that defines Status
Note2:
To fix such warning,
"base class‘base_class’should be explicitly initialized in the copy constructor"
the compy ctor and the '=' operator has been set as private member

ENH: SlicerQt: Remove useless QLabel in qCTKSliderSpinBoxLabel. Users tend to use that instead of having an external QLabel, as a result, the panels sliders/spinboxes aren't aligned if a couple of qCTKSliderSpinbBoxLabel are in a QVerticalLayout. It's better to use a QGridlayout with QLabel in the first column and qCTKSliderSPinbBoxLabel in the other column.

ENH: SlicerQT: the TractographyFiducialSeedingModule name in KWWidget Modules is FiducialSeeding and not TractographyFiducialSeeding. By having a different name, it creates a new entrie in the module list, and the Qt module is not synchronized with the KWWidget module. The name was given automatically by a macro that parses the class name. Here we give a name manually.

ENH: SlicerQT/QTCLI - Added updateCommandButtonState slots in charge of
enabling/disabling the Apply and Cancel button
The associated UI has also been reviewed, the button are not always
visible, the user doesn't need to scroll to apply the parameter and 'run'
the module.

STYLE: SlicerQT - In qVTKWidget, renamed qVTKAbstractMatriXWidgetPrivate.h to qVTKAbstractMatriXWidget_p.h
When the pimpl declaration has to be added into a separate header file
this one should be name after the original class by adding the suffix '_p'
ClassName.h (Public API) -> ClassName_p.h (Pimpl)

PERF: moved Steve's method of delaying the annotations to the SliceSWidget and out of CrosshairSWidget. Using the delayed method all the time. Requires keeping track of leave events in order to skip delayed annotations that would try to turn annotations on after the mouse left the window.

BUG: Enter() called multiple times on a module when selected from module menu: (1) by menu itself, (2) by layout node when the first callback sets the current module on the layout. BUG: Next/Previous navigators were not updating the current module in the LayoutNode

ENH: Modified launch_RunProgram so that errors are written to the console output (instead in a popup window). This is useful for test execution (CTest is not blocked if a test file cannot be executed, but immediately returns with a failure and the error is logged).

COMP: SlicerQT - Fix shadow warnings
The shadowed variables where changed by adding an underscore:
parent -> _parent
Note also that the signature in the header doesn't contain any underscore,
only the implementation file has it.
qCTKFlowLayout code has also been reviewed to be compliant with
current QT coding style

BUG: SlicerQT: This time drag & drop is really working with qMRMLTransformProxyModel. The pb was when the old location of a child to reparent was moving the new parent position. vparent was not updated to the new position.

BUG: Test: SlicerQT: Propagate the design change made in -r11584 to the tests. A module is effectively valid when it is instantiated. registering a module is not enough. The module name is retrieved when registered, the module title is valid when instantiated.

ENH: SlicerQt: In order to have a synchronized representation of a vtkMRMLScene at any time in the Qt tree widgets, adding and removing a node must emit more events, events to warn that a node will be added/removed.

ENH: SlicerQT: Redesign the qMRML*Models. Now qMRMLSceneModel is a flat mrml list. and qMRMLTransformProxyModel is a sortAndFilter model that gives hierarchy to the flat scene. Drag and drop still don't work

BUG: remove final sleep - there seems to be a linux-specific bug in which a process that exits while there is a sleep timer active will hang instead of exit (stack trace indicates the process stays in select() forever

BUG: replace stubbed out test with something more likely to pass. This test needs to be further investigated to be sure processing has completed before analysis steps begin. This may require a new method on the MRML scene to ensure that any deferred data read operations have completed

BUG: since data is read back asynchronously from the command line modules, need to check that all data has been read before going ahead and using it. Also ENH: add some delays between steps so it is easier to see the test running.

ENH: SlicerQT - Add macro WIDGET_VALUE_WRAPPER and INSTANCIATE_WIDGET_VALUE_WRAPPER to qSlicerCLIModuleWidget
These macros provide a way to generically retrieve values associated with
any sort of qwidget (QSlider, QDoubleSpinBox, etc...)
A QList of WidgetValueWrapper is used to keep track of the all the instantiated
widget value wrapper.
The first macro "WIDGET_VALUE_WRAPPER" is used to define a specific
wrapper extending from the class "WidgetValueWrapper".
For example:
Writing "WIDGET_VALUE_WRAPPER(IntegerWithConstraints, QSlider, value);"
will define a class
IntegerWithConstraintsWidgetValueWrapper extending from WidgetValueWrapper
and also provide with the method "value()" which is, internally, responsible
to call the appropriate method (i.e value()) on the 'QSlider' widget.
Then, using the macro INSTANCIATE_WIDGET_VALUE_WRAPPER, the wrapper
is instanciated and added to the list.
Later on, looping over the list and calling the virtual method "value()"
will return a QVariant object. Checking for the QVariant type
and calling the appropriate "toType" method allow to obtain the
associated value.(->value()->toBool(), ->value()->toString(), ....)
For specific case such as the "RadioButton", a WidgetWrapper has also been
defined: ButtonGroupWidgetWrapper
Indeed, since QButtonGroup doesn't extend from QWidget, this wrapper fills the gap
and provide the "checkedValue" method allowing to return the string associated
with the checked radiobutton.

COMP: Create folder Libs/MRMLCLI containing vtkMRMLCommandLineModuleNode
Since vtkMRMLCommandLineModuleNodehas been removed from Base/QTCLI and
Modules/CommandLineModule, this will solve the compile problem on Darwin.

COMP: SlicerQT - Slicer3_USE_QT is now define using #cmakedefine Slicer3_USE_QT in vtkSlicerConfigure.h.in
Note: It was previously defined using ADD_DEFINITIONS(-DSlicer3_USE_QT) in CMake/Slicer3FindQT.cmake

ENH: SlicerQt: Use polymorphism with the slicer module factories to factorize code. Still in qSlicerModuleFactory, remove instantiate from register (loadable modules where instantiated when registered): this was done to retrieve the module title at the registration time. The module title is now valid after a module is instantiated. (Behavior is consistent between the core modules and the loadable modules, you don't want them to have different behavior. When a module is registered: registerCoreModule, registerLoadableModule, registerCmdLineModules), a unique name is generated. When a module is instantiated, it can be used thanks to the module title.
More factorization could be done...

ENH: SlicerQt: rename qCTKAbstractFactory::getItem into qCTKAbstractFactory::item. qCTKAbstractFactory::instantiate() is now virtual, the sub classes can derive it (qCTKAbstractQObjectFactory was declaring another instantiate() method, I wonder what was the exact behavior...) As it was supposed to, the qCTKAbstractFactory::registerItem() methods in derived classes now returns a unique key: the metadata class name for qCTKAbstractQObjectFactory, the filename (dll) for qCTKAbstractLibraryFactory and qCTKAbstractPluginFactory.

ENH: SlicerQT - Updated method registerQObject from qCTKAbstractQObjectFactory to return the associated object name.
This change avoid to have redundant code.
Note: The parameter 'key' passed by reference is updated with
the corresponding value.

ENH: SlicerQT - Add property SelectNodeUponCreation to qMRMLNodeSelector
After a node is added to the scene, it's now possible to specify
if the widget should update its current selected node or not.
Note: If set to False, in case the node is added though the widget,
the index won't be updated.

BUG: SlicerQt: When compiling plugins in debug mode, they were actually compiled in release mode (forced by the -DQT_NO_DEBUG compiler definition). It resulted that when running the Designer in debug mode, it couldn't load the debug plugins (because Q_EXPORT_PLUGIN2 was building a qt_plugin_verification_data string with debug=QT_NO_DEBUG). The message in the designer was: incompatible qt library, "cannot mix debug and release"). I believe the -DQT_NO_DEBUG comes from the Maverick project that was forcing any plugin to be in release (but it was a mistake of course ;-)).