ENH: Add QuadBuffer stereo support

By default there is always an attempt to enable stereo capability. This is
done in ctkVTKAbstractViewPrivate::setupRendering [1].

Then, following the test done within the different implementation of
vtkRenderWindow, in case the hardware doesn't support it, the flag associated
with StereoCapability will be turned off [2][3].

Finally, the action within the threeD controller widget is enabled
or disabled based on the state of the StereoCapability flag.

[1] https://github.com/commontk/CTK/blob/4e98d9a064bfe32a4c0cb28838a093e392dc3cc3/Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.cpp#L102
[2] https://github.com/Kitware/VTK/blob/0e0674a3695fdeaf01ce87dfc04e32111b7402e0/Rendering/vtkXOpenGLRenderWindow.cxx#L351-401
[3] https://github.com/Kitware/VTK/blob/0e0674a3695fdeaf01ce87dfc04e32111b7402e0/Rendering/vtkWin32OpenGLRenderWindow.cxx#L734-738

See http://www.na-mic.org/Bug/view.php?id=1578

Fixes #1578

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22234 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Custom style for slicer

Allow the slicer to use custom styles. This rests on the Qt style plugin
framework. The style plugins must be compiled with the same Qt as slicer,
in the same mode (debug, release...) and in shared library mode.
To facilitate the creation of new plugins, a cmake macro was added to
slicer cmake directory.
Every slicer style must inherits from qSlicerStyle. They are not detected
by the application otherwise.

The new styles can be set like modules. A setting page is added for them
where user can specify the directory containing his plugin. The additionnal
paths and the style key are added as settings. This means that the next
time slicer's session is opened, the application will automatically load
the custom style if it still exists.
Adding or removing paths necessit the application to be restarted. This
comes from the fact that the QStyleFactory is only updated upon its
creation which only happens when starting the application.
Changing the style however doesn't need to restart the application.
At this occasion, a Slicer dark style was added to the list of available
styles.

On the implementation side, the designer plugin export definition was
shortened and includes the "DESIGNER" term so it is different than the
style export macro.

Finaly, adding a fix to the slice controller widget label style so
it can work with the new dark style.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22235 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Group appearance related settings together

The settings in General that are related to the slicer's look were moved
to the style setting panel. At this occasion, this panel was renamed
Appearance.
This allow a better grouping of the application customization option for
an easier user experience.

Also used the occasion to add tooltips to these options.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22236 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Exclude mrml extension from git hook line lengths check

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22237 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix MacOS style library fix up

Following r22235, slicer couldn't start on Mac due to the style. In the
libraries fixup, the styles plugins weren't properly bundled.
Adding the style library fixes that.

Fixes #3253

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22238 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Remove forgotten Qt style

The style Macintosh (aqua) was still available on MacOS in the settings
even though it's a default Qt style.
Adding it to the list of Qt default style removes it.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22239 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Ensure qSlicerStyle is used when using SlicerApp-Real

When the launcher isn't used, for example when using SlicerApp-Real
directly, the plugin library cannot be found before the qSlicerApplication
is created. (QT_PLUGIN_PATH isn't set).

However once the application is started, the current location of the
executable is automaticaly added to the application library paths by Qt.

See Qt-doc: http://qt-project.org/doc/qt-4.7/qcoreapplication.html#id-a4ff2599-e40c-4218-82e7-14e570ebf822
"The directory of the application executable (NOT the working directory) is always added (...)"

Since this also corresponds to the location that needs to be set for the
plugins, the styles are automaticaly discovered.

See also the discussion:
http://massmail.spl.harvard.edu/public-archives/slicer-devel/2013/013320.html

Fixes #3252

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22240 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Ensure Slicer dashboard packaging works if svn not in path

During recent windows factory maintenance, the path containing svn has
been removed from the PATH so that git bash could work with git svn.

As a side effect, dashboard windows packaging ceased to work.

Discussion: http://slicer-devel.65872.n3.nabble.com/Windows-nightly-not-on-download-page-tt4029503.html

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22241 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add pointlist support to OpenIGTLinkIF and fix warnings

Fixes #3077
Fixes #3248

Co-authored-by: Isaiah Norton <inorton@bwh.harvard.edu>

From: Junichi Tokuda <tokuda@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22242 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: 3191. Added ability to select multiple ROI labels in the interactive seeding module

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22243 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: #3257 update color selection when color node changes in Editor

Be sure to use the up-to-date color node to display the names
and colors for the label layer.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22244 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: avoid duplicated saveState when using applyScopedLabel in editor

Since the Chagne and Save island effects use the superclass's
applyScopedLabel method they don't need to explicitly save state
(it is done automatically).

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22245 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: #3125 preserve .nii.gz extension on scene save

Use completeSuffix per suggestion from jcfr.

Note this code may still change as I work on fixes for #2326.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22246 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: avoid warning a about narrowing 0.0 to int

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22247 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: #1930 ensure redraw after rotate to volume plane

Make sure matrices reflect current orientation of the slice
plane.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22248 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: 3258. Fixed the case when the fiber is outside the label map volume extent and it caused the crash in FiberBundleSelect module. It will output a warning in this case now.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22249 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add a version for the FreeSurferColorLUT_YYYMMDD.txt so that multiple versions can be available.

The first line of the FreeSurferColorLUT.txt file as provided from the freesurfer binary distributions contains a source code date-time stamp
that can be used to version the files unabiguously.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22250 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add stock un-altered version of the LUT

For 20120827 directly form freesurfer
The next patch set will modify this file for slicers purposes.

ENH: Modify for Slicer LUT conformance

s/^#/# /g  <-- Comment lines need a space after the #
s/0$/255/g <-- the alpha channel needs to be 255 in all cases except unknown
%s/\(nknown.* \)255$/\1 0/g   <-- unknowns need to be transparent

ENH: Change Default LUT to the 2012 freesurfer.

This addresses the issues in mantis ticket
http://www.na-mic.org/Bug/view.php?id=3238

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22251 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: #3267 silence warning message

By changing the error message to a debug message we avoid signalling
an error condition when in fact it's not an error.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22252 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: #3262 update data probe on non-mouse-move events

Allow key strokes and other events that change the slice display
to trigger updates to the DataProbe window.  Only update the display
for the sliceView that matches the one most recently entered by
the mouse pointer.

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