Add single, double, and data array functor dispatch classes.

The dispatcher provides the ability to do multiple dispatching based
on a runtime polymorphism. This allows mapping to compile time
polymorphism.
The double dispatcher allows you to call a functor
based on the types of two objects allowing you to call specialized
implementations.
The data array dispatch is a replacement for the vtkTemplateMacro
offering an object based way that is far easier to read and use.

Change-Id: If281ddc1ac803c0ed234e33c9cc0bf4c090fca71
Capture GL2PS special props in the renderer instead of renderwindow.

Previously, all props that needed special handling by the GL2PS
exporter were captured in the RenderWindow, and then renderered in
each renderer separately. This patch associates each prop with its
respective renderer so that multiple renderers can be handled correctly.

Change-Id: I81f365b6a57ce4144f837b64d8b494fd964add7b
Clean up some compiler warnings.

Shadowed parameters and signed/unsigned comparisons.

Change-Id: I0e167f346409a40a9b03faf1c9e41d5b1a62897f
Clean up GL2PS exporter.

This patch moves much of the messy logic in WriteData to protected
helper functions, replaces if/else if chains with switch statements,
and gets rid of early declarations.

The code to draw text on the overlay plane from
vtkTextActors/vtkTextMappers is combined and updated to work with
the correct renderer's transformation applied.

Change-Id: Idd802e12134d8038cab8f732f8e5d31058bb2425
Add testcase for multirenderer export.

Verify that the output of multiple renderers is valid (needed
for ParaView).

Change-Id: Idffdb7ec87091255eaf85640090ea30e6d7d2a65
Add vtkGL2PSExporter::Draw3DPath to reuse GL path transformation.

Both the vtkMathTextActor3D And vtkTextActor3D classes need to transform
a vtkPath according to GL state. This patch encapsulates the GL/GL2PS calls.

Change-Id: I0eea1ff1be647c165ff214289b8fb765add7384d
Enable zlib and libpng support in vtkgl2ps.

Also remove an unnecessary call to INCLUDE_DIRS in
ThirdParty/gl2ps/CMakeLists.txt.

Change-Id: Ieaee126f4c1c8375bac28b29a4fc96b143376aa2
Only add other hierarchy file if they exist

Hierarchy fileis for dependant modules may not exist. For
example building against an installed version. Add check
to prevent them being past to the hierarchy tool if they
don't exist.

Change-Id: I350560a5bcdfb8ea1a13643ccd15fbffdb470a75
AMR classes: major data structure changes

The main motivation for the changes is to improve the efficiency
of AMR data structures by replacing the data set containers and meta
data representation with new data structures.

First, the meta data associated with the AMR data is moved from
vtkInformation to a new class vtkAMRInformation so that they do not
have to be deep copied. Related changes also include:

- Before, when the LOAD_REQUESTED_BLOCKS() key is not set, the reader
  would recompute AMR meta data based on the requested blocks.  This
  is no longer done: meta data always represents what is on file.
  The reason is to avoid the sensitive meta data computation that
  depends on connectivitiy of the requested blocks.

- Processor ranks are no longer stored in the meta data. Filters
  can easily generate them by using
  vtkAMRUtilities::DistributeProcessInformation

- There used to be two types of 1D indices used to reference blocks in
  an AMR: vtkOverlappingAMR::GetFlatIndex and
  vtkOverlappingAMR::GetCompositeIndex. Now only the latter is used.
  The "other" 1D index is file type specific so now only the readers
  reference them (vtkAMRInformation::GetAMRBlockSourceIndex())

- To make it easy to traversal the bounding boxes in the meta data. A
  new key vtkObject::BOUNDING_BOX() has been added that works with
  vtkOverlappingAMRDataIterator. See its use in vtkCompositeCutter for
  an example.

- In a multiprocess setting, vtkAMRSliceFilter for each process computes
  the complete meta data to avoid communication

- Many functions in vtkAMRUtilities are removed because they provide
  support for computing meta data from data sets. In the new design,
  meta information is always created before data sets are constructed.

Second, VtkUniformGridAMR now use a more compact representation of the grid
blocks than the tree implementation done previously. To facilicate
this, vtkCompositeDataSet now becomes a fully abstract class and all
concrete implementation gest pushed to the class vtkDataObjectTree.
In the new implementation, the non-null blocks are stored in an stl
vector. So traversing them (using vtkUniformGridAMRDataIterator) is
efficient.
- The AMRBox has been reduced to store only the lower and upper
  corners.  Information such as origin and spacing are moved to the
  container class vtkAMRInformation, since they are often common to
  all boxes or boxes on the same level.

- File reoganization: - AMR File readers are moved from Filters/AMR to
  IO/AMR - AMR algorithms (vtk*AMR*Algorithm) are moved from
  Filters/General to Common/ExecutionModel

Finally, tkAMRVolumeWrapper is moved from filters to rendering.
The dependency on vtkAMRResampler and vtkParallelCore makes it
difficult for it go to Rendering/Volume so a new module
Rendering/VolumeAMR is created.

Change-Id: Id73d214e6a5ac4d4a08fde5d979365f46edfa390
Attempt fix for failing EmptyInput/SetGet tests.

Change-Id: I4746670ff4623f79eafed7d6ba8c898b996457de
Merge topic 'categorical-color' into master

11f1c78e Attempt fix for failing EmptyInput/SetGet tests.
Merge topic 'wrap-hiearchy-check' into master

879e75cc Only add other hierarchy file if they exist
Merge topic 'amr-datastructure-changes' into master

8fc6cf25 AMR classes: major data structure changes
Merge topic 'GL2PS_png_zlib_support' into master

71435278 Enable zlib and libpng support in vtkgl2ps.
Change function signatures for more consistent style.

Functions were returning new objects, but were inappropriately named.
This patch changes these functions to populate input objects, rather than
creating new ones.

Change-Id: I9288848094b1480cc4c2a8ce0ef3f01e4bd219e9
Silence some compiler warnings in GL2PS code.

Change-Id: I10abbad8781b612cda4b1219d467049bd3d942fa
Fix annotation label placement.

The previous test did not render the scalar bar with
an even number of labels and missed a bug in the placement
for that case; this fixes things and modifies the test
to include multiple scalar bars with both even and odd
numbers of labels.

Change-Id: I09fb46fe7cbd19ec70f12a9969d2455d1453945c
Merge remote-tracking branch 'origin/master' into GL2PSMultiRenderer

Conflicts:
	IO/Export/vtkGL2PSExporter.cxx
	  - Some trivial warning fixes conflicted.

Change-Id: If22de2c824b3bc340109d48bb3b3fc5fc4e88070
BUG #13396. Fix issues with using system hdf5.

When using system hdf5, HL libraries were never found. The problem was because
HL libraries are an optional component and find_package(HDF5) was never asking
for it. Thus when using system HDF5, NetCDF always warned that it is disabling
NetCDF4 support (since NetCDF4 needs HL libraries).

This was fixed as follows:
- vtk_module_third_party(..) macro now takes optional arguments COMPONENTS and
  OPTIONAL_COMPONENTS. These can be used when adding third party modules to
  ensure that when USE_SYSTEM_<module> is ON, the find_package(..) call is
  passed appropriate components.
- Consequently <module>_INCLUDE_DIRS and <module>_LIBRARIES is properly set to
  include the paths and libs for the requested components and dependencies don't
  have to do anything specific.
- Cleaned up vtknetcdf code to avoid creating unnecessary cache variables,
  namely USE_NETCDF4, NETCDF_ENABLE_NETCDF4. USE_NETCDF4 now is just a regular
  variable (not cache) and we use that to determine whether netcdf4 support is
  enabled.
- The state of USE_NETCDF4 depends on presence of HDF5_HL_LIBRARY variable when
  using system hdf5. We assume HL support when using VTK's HDF5.

Change-Id: Id3f5541dbad772797842ca24c6dc051d1056d14a
Merge topic 'categorical-color' into master

22e64084 Fix annotation label placement.