Clean an enhance hypertree grids.

Fix typos, style & a potential memory leaks.
Add initial support for extent on level 0 rectilinear grid.

Change-Id: I03ddd5a0b5a30901054a59ebe2bee2be38fa2bf8
PERF: Parallel streamline was slow. Fixed.

vtkPStreamTracer was causing the creation of a new locator at
every iteration (task), which is very slow for cell locators
since they have to bin data every time. Fixed by removing
the reallocation and using one locator. The input data does not
change between iterations so recreationg the locator was totally
unnecessary.

Change-Id: I966f25caf2e05ba08355a426f3e31f1ac66517ef
ENH: Provide PlaybackFile for recorded interaction events

Many of the Widget tests supply in-code event logs. This patch adds
an additional option to vtkTesting::InteractorEventLoop. The new
option, --PlaybackFile, supplies a file name for the
InteractionRecorder. This allows tests to modify the playback
events without changing the source code for the test. This separates
changes to the playback events from changes to the test code.

A couple of tests have been modified to illustrate the usage of the
InteractorEventLoop.

In the future, the current widget tests should be changed to use the
InteractionEventLoop rather than ifdef'ed code for playing and
recording.

Change-Id: I6aa2afd7c161fe82646fc1df7d326ca8a3249a2f
Fix the extent for tiled tiff files.

There was an off-by-one error in the setting of the extent.

Change-Id: I1818184845a11bc7cbf560e4bfb270a943c8a8ac
Merge topic 'tiled-tiff-extent' into master

0fe573e8 Fix the extent for tiled tiff files.
Two fixes for certain lsm (zeiss) tiff images.

The first fix is that some zeiss images set PlanarConfig to "SEPARATE"
(i.e. separate color planes) even when NumberOfSamples is 1.  When the
number of samples is one, the PlanarConfig can be safely ignored.

The second fix is that ReadVolume assumed that the number of slices was
always equal to NumberOfPages, which was in conflict with ExecuteInformation
which set the number of slices to SubFiles if SubFiles > 0 (cf line 505).
This caused a crash, because ReadVolume was reading more data than the
reader had allocated space for.

Change-Id: I822e45a53c210b5edebfe8ce27443fe1434110ba
Merge topic 'fix-locator-recreation' into master

f82238ed PERF: Parallel streamline was slow. Fixed.
Merge topic 'RestoreInteractionWidgetTests' into master

eb1a585d ENH: Provide PlaybackFile for recorded interaction events
Add reader/writer for NIFTIv1 and NIFTIv2 files.

This patch adds support for reading and writing NIFTI files, as well
as full access to the NIFTI header.  Versions 1 and 2 of the NIFTI
header are supported, and the reader can also be used to read Analyze 7.5
files, though the only Analyze header elements that are supported are the
ones that overlap with NIFTI.  Automatic compression and expansion for
gzipped files is also provided whenever the filename ends with a .gz
extension.

Change-Id: Iead3afb1a65d8c01aa52f3ca55c6da2f08703375
Merge topic 'nifti' into master

e7aa61da Add reader/writer for NIFTIv1 and NIFTIv2 files.
Merge topic 'CleanHyperTreeGrid' into master

d0c862b4 Clean an enhance hypertree grids.
Add SetSlabModeToSum() to vtkImageResliceMapper.

This change allows vtkImageResliceMapper to produce images that look
like digitally reconstructed radiographs.  It required a new property
to be added to vtkImageReslice, called ScalarScale, so that the output
intensity can be appropriately scaled to the slab thickness, which is
specified in physical units of distance (typically millimeters).  An
existing test was modified in order to test this new feature.

A ScalarShift property was also added for symmetry with ScalarScale,
plus an OutputScalarType property so that vtkImageReslice can output a
different scalar type than its input (useful for avoiding overflow with
SetSlabModeToSum()).

This change also fixes a performance issue that was introduced in August
2011 when the SetInterpolator() method was added: that change caused the
scalar conversion to always clamp to the limits of the output type, even
when clamping was unecessary.  Now, clamping is only done when needed.

Change-Id: I5e55db509e8ec537632a7a7e063a3bc0c50d9d20
Merge topic 'ExposeSlabSum' into master

048419fb Add SetSlabModeToSum() to vtkImageResliceMapper.
Merge topic 'tiff-zeiss' into master

7ff8bfd0 Two fixes for certain lsm (zeiss) tiff images.
Refactored how pieces and extents are handled.

Refactoring the way VTK goes between piece and structured
extents. Before, extent translators were used when the pipeline
moved from structured to unstructured data converting piece
request to extent request. This caused many problems with filters
that altered extents, mainly a lot of redundant IO due to
repartitioning of different extents. This became extremely
cumbersome to manage when running distributed. The new behavior
pushes the extent translation all to way to the readers and
only when readers are able to read a subset. This works much
better. The only downside is that filters need to be able to
handle data extents different than update extents. Most filters
can do this but many imaging filters cannot. Those that are
needed in parallel will have to be updated.

As part of this work, I also removed MAXIMUM_NUMBER_OF_PIECES
and added CAN_HANDLE_PIECE_REQUEST. MAXIMUM_NUMBER_OF_PIECES had
reduced to being a boolean. 1 for serial sources, -1 for parallel
sources. I removed it and added a CAN_HANDLE_PIECE_REQUEST instead.
This key, produced by a source, tells the executive that a source is
able to handle piece request. It is a source only key produced in
RequestInformation and is not propagated downstream. If this key is
not present, the executive will only execute the source for piece 0
to produce the entire data. It is then up to the user to add a filter
that splits the data for other piece requests. The only exception to
this is when CAN_PRODUCE_SUB_EXTENT is present, in which case the
executive will split using an extent translator AT THE source - not
downstream.

Conflicts:
	Filters/FlowPaths/vtkParticleTracerBase.cxx

Change-Id: I8db4040289ff87331adeecded4a738313d9b52df
Update the XML readers and writers to work with pipeline changes.

The XML readers and writers, both parallel and serial, now work
with the pipeline changes. Now, all writers work with pieces
even though the structured ones can handle asking for a sub-
extent.

Change-Id: I9f757ba12a3b9fb84e141506dacadad608eb8b99
Cleaned up and fixed transmit filters for structured data.

Change-Id: I7e5c55259159752882c8ae056e08f9bec12b3c02
Fixed bug in send structured data.

The origin was not offset properly in cases where extent
had to be adjusted. This is all due to the fact that the
legacy writer always writes extents starting at 0.

Change-Id: Id37f21d7c99d2ecdf6285d2870bf87e10b534a7a
Fixed legacy parallel reader and writer.

To work with the new pipeline changes.

Change-Id: Ic5c8ac86026999f79924d8e61b10fbcb18286bb8
BUG: Was using array of wrong size.

Was trying to read the extent into an array of size 3 instead
of 6. Doh!

Change-Id: Ic8bb2872782c86739ddf8119b3d44edb35e42e06