ENH: provide direct access to tensor arrays from python

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22071 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Ensure backward compatibility in qMRMLNodeComboBox

Here is a quick summary of what happened:

What changed in r22052:
 Rename the Q_Property from currentNodeId to currentNodeID
 Rename QString currentNodeId() to QString currentNodeID()
 Rename setCurrentNode(const QString nodeID)
  to setCurrentNodeID(const QString nodeID)

What changed in r22059:
 Add QString currentNodeId() as a deprecated function
  (not invokable though)

What is broken after r22052 and r22059 ?:
 In C++, the function setCurrentNode(const QString nodeID) is missing.
 In Python:
  The function currentNodeId() is missing (not wrapped due to a missing
   Q_INVOKABLE).
  Trickier, any code using the property currentNodeId = ... will break too.

What this commit intend to fix:
  Add Q_INVOKABLE to currentNodeId() method for python wrapping.
  Return the old property as deprecated.

Also adding warning in the deprecated function to warn other developers.

See Issue #1694

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22072 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: 3141. Added heck for NULL LUT.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22073 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: #3029 force slicer to be in the C locale to avoid data truncation


Set the locale to be "C" to avoid issues related to reading and writing
of floating point numbers.  For example, when the decimal point is set to be
a comma instead of a period, there can be truncation of data.
See these previous commits and the
+  // http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21856
+  // http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21865
+  // http://slicer-devel.65872.n3.nabble.com/Re-Rounding-to-integer-tt4027985.html
+  // http://slicer-devel.65872.n3.nabble.com/Re-slicer-users-Slicer4-can-t-really-use-it-yet-td4028040.html
+  // http://slicer-users.65878.n3.nabble.com/Slicer4-DICOM-many-problems-td4025919.html
+  // and issue #3029

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22074 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix MRMLScene import and export

In the selection node, the unit didn't add a
NodeReferenceMRMLAttributeNames for each of its reference role. These
attributes are used when saving the mrml scene to describe what the
reference role is used for. Most notably, this can be used when importing
a scene.
However, since there wasn't any defined for the selection node, a saved
scene would look like this:
 ... selected="false" ="vtkMRMLUnitNodeApplicationLength" "vtkMRMLUnitNodeApplicationTime" activeVolumeID="NULL" ...
Which is an invalid format for the scene.

Adding a NodeReferenceMRMLAttributeNames is usually done in the class
constructor. In our case, we assume that we don't know what kind of unit
quantity can be added. Thus we don't know the ReferenceRoles we will need
at constructor time. So we add theses roles in the SetUnitNodeID().
The roles names are based on the quantity, and aren't actually used
anywhere.

To make sure this works, a test opening Slicer, saving a scene and loading
it again is added.

See Issue #3145

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22075 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fixed crash on missed fiber selection

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22076 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: add shortcuts for module navigation

Per discussion on developer hangout, added a shortcut:

Cmd/Control+F : search for module

Then I decided to add these as well:

Cmd/Control+Left : previous module
Cmd/Control+Right : next module

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22077 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Delete unnecessary Q_ASSERT in unit aware widgets

These asserts were added with the slicer normal context of execution in
 mind. In this case a scene should have a selection node at all time.
However, in tests that is not the case. Since the code is already
acounting for the fact that there might not be a selection node
(see updateWidgetFromUnitNode()), the asserts can just be removed.

See Issue #3143

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22078 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: add example of manipulating contents of web view

In this example the qt qpi is used to manipulate the DOM of a loaded
web page.  In this case, we add a search string into a form, but the
concept could be generalized to allow exchange of data between slicer
and any web-based system that doesn't expose a clean web services api.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22079 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: try to fix test failures on some platforms

This test was failing on the windows factory machines but not
on non-windows.  Possibly this is due to the window size or another related
variable causing the painting to happen outside the visible
region of the MR in the slice view.  This change makes sure the clicks
occur near the center of the slice view so as to avoid the
boundary case.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22080 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: check in a new baseline for Multiresolution Affine cli test

This result is based on the module running with ITKv4 and shows
a slight shift compared to the old baseline, which is probably
due to improved subpixel indexing in the newer version of ITK.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22081 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: #3029 use 'setlocale' to force C over native language

It turns out that it is not enough to set Qt's locale and we must
also set the c standard library locale in order to avoid data
corruption when the decimalpoint is not period.

Many thanks to Marine Clogenson of EPFL for noticing and helping
figure out how to reproduce this issue!

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22082 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: update Swig version and fix md5 hashes per Brad's suggestion

Try to fix windows build errors like [1] by copying the version
info and hashes from the SimpleITK source [2].

[1] http://slicer.cdash.org/viewBuildError.php?buildid=106147
[2] https://github.com/SimpleITK/SimpleITK/commit/331990f42c2f5777ccc9c849025bb2db68709a68

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22083 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: fix swig build to match SimpleITK

Use the same version and url that are known to work in SimpleITK's
superbuild.

Note: also remove "${${PROJECT_NAME}_EP_DISABLED_UPDATE}" and replace
it with UPDATE_COMMAND "" as I believe this gives the same effect and
avoids confusion about the intent.  More importantly, on windows
the empty cmake argument led to the addition of a semicolon to the
directory name (so it became "swigwin-2.0.9;") which was ugly and
confusing.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22084 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: fix swig executable path

Conform to cmake script syntax limitations.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22085 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: RSS label image type bug fixed

previously char pixel type is used for input/output label images.
but that is not enough for larger label values. this causes crash.
I changed it to short type to hold more label values.
Tested on previous fail cases and works now. Linux 64

From: Yi Gao <yi.gao@gatech.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22086 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: #3081 support drag-and-drop of dicom directories

Use Julien's nice scripted file dialog code to support adding
directories to the dicom database.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22087 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: 3133.  invoke TransformModifiedEvent when new TransformNode is set

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22088 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: 3148. Fixed crash on transform node reparenting

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22089 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: fixed module labels

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