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