add difference array to output tree

Previously we modified the first input tree by adding the difference
array to it.  It makes more sense that we add this array to the
output tree instead.

Change-Id: I201dfa428ce882a22fbf5ce92896565a490667e6
Change color map generated by SetTreeColorArray()

SetTreeColorArray() now displays all edges with negative values
in shades of red, and all edges with positive values in shades
of blue.  Edges with a value of zero are now drawn in grey.

When SetTreeColorArray() is called, the edges in the tree are
now drawn slightly thicker.  This makes it easier to see the
colors.

Change-Id: Id0564e1e8d0389bcd395fdbbb3cba84ee720665c
reintroduce segfault fix for PrintSelf

I accidentally overwrote this change in a previous commit.

Change-Id: I00683705cd171094831e0c7c6deb858300b7ab02
Use scalar annotations on interval-mode scalar bar.

This commit renders user-provided notes associated with specific
scalar values on the interval-mode scalar bar. Previously, only
the categorical mode rendered these annotations.

Also, provide the scalar bar with an optional swatch
to illustrate the color assigned to NaN values.

Add an option to color leader lines from the scalar bar to
the annotation labels by the corresponding scalar value.

This commit also breaks the process of rebuilding the scalar bar
into several virtual methods so that subclasses (particularly
ParaView's `vtkPVScalarBarActor`) can reuse more of the base class
functionality. The process is now separated into 2 phases: layout,
where bounding boxes for scalar bar components are placed; and
configuration, where actors are positioned and geometry is created.
This includes some changes to text actor to support constrained
placement and text size queries.

Add a test for the new scalar bar options.
There are now many more options controlling how the scalar bar behaves.
In particular many settings interact with the way geometry is rendered:
the lookup table may be indexed or not (thus tick marks may not be
rendered); the orientation may be horizontal or vertical; annotations
may be rendered or not; the NaN annotation may be omitted; leader lines
to annotations may be colored by the scalar they annotate or by the label
color; and the tick marks may precede or succeed the scalar bar.
Also, we must test how empty labels are handled and how even vs odd
numbers of labels affect placement (since the algorithm for placement
behaves differently in these cases).

We cannot perform a full factorial test, but do test independent
configurations.

Finally, this commit improves the performance of prominent value
detection for primitive-type arrays (e.g., int, double) by avoiding
the use of vtkVariant instances to hold the working set of distinct
values during sampling.

Change-Id: I852f9b497d5e6ab619d9d7b763f641c44e4869cf
Allow empty string rendering to succeed.

An empty string should not be considered an error condition.

Change-Id: Ia19c3b6a459897b54901920eac1fa2f3826e6fba
Pad scalar-bar title to prevent ugly layout.

Change-Id: I3f69aa027f2228470a31a47872a8ffd53637ced8
More adjustable scalar bar widget.

Now the padding around text and the border can be adjusted.
Also the relative amount of space taken up by the title and
tick labels can be changed as can the thickness of the scalar bar.

Change-Id: Ic66514a80feb0d2c81fd9daa67f743b9a619b529
Better aesthetics for scalar bar actor.

Change-Id: I489209a89ad12fc64ece0fa9023977a72578790e
Revert "Prevent division by 0 by bailing early"

This reverts commit 5bb0f14f70. For some reason, this
commit causes some dashboard failures on Mac OS X 10.8:
crash when setting the cursor. It is not clear why but
we are temporarily reverting this commit to verify that
this fixes the problem.

Change-Id: I027af718fa0e441aa6d688a29978dcd2d9576710
address Gerrit review feedback

We don't need to use a std::set to generate the tree difference color
map.  This was initially used to count the number of distinct difference
values, but instead we now setup our vtkLookupTable by constructing a
range of values that are symmetrical about zero.

Change-Id: I1c0ba6a2baa157382113f45badaa8cb6aecb0917
Merge topic 'revert-commit-to-fix-dashboard' into master

feaf55f2 Revert "Prevent division by 0 by bailing early"
COMP: Fix -Wundefined-reinterpret-cast in TestFastNumericConversion.

Change-Id: I20851bb6130f9bad7f65554533e765107d3bd1ef
Merge topic 'change_tree_difference_colors' into master

eacde2ae address Gerrit review feedback
5a1b31c6 reintroduce segfault fix for PrintSelf
9169efc9 Change color map generated by SetTreeColorArray()
2ea34d62 add difference array to output tree
Merge topic 'scalar-annotation' into master

36b22827 Better aesthetics for scalar bar actor.
3893b0be More adjustable scalar bar widget.
07be3e42 Pad scalar-bar title to prevent ugly layout.
8a7aaf67 Allow empty string rendering to succeed.
55cb7e11 Use scalar annotations on interval-mode scalar bar.
Merge topic 'warn-numeric-conversion' into master

40038dea COMP: Fix -Wundefined-reinterpret-cast in TestFastNumericConversion.