ENH: Adding libminc and updating MINC IO support.

Added libminc library inside Modules/ThirdParty/MINC to compile withing ITK.
Also rewrote MINC IO from Modules/Nonunit/Review/  to work correctly,
also added extensive testing to the module.

ENH: Modified UseITK.cmake to include automatic MINCIO initialization

BUG: MINC2 Metadata reading and writing is now supported and compatible with ITK standard

BUG: Dimension order and step sign is now preserved

BUG: Run uncrustify on all source code to satisfy ITK style requirements

BUG: Fixed error with wrong order of dimensions

BUG: Reduced number of tests

BUG: Fixed error in interslice normalization when reading floating point volumes
     in libminc, so updated GIT TAG

BUG: Made libminc to compile statically always and with itk_ prefix to avoid
     potential conflict with already installed libminc

BUG: Fixed a bug in underlying libminc library, updated GIT tag

BUG: Fixed a bug while reading vector images or time-series with zero time step

ENH: Updated to latest version of libminc

ENH: Making more tests

BUG: Fixed logical error when reading files with global normalization

BUG: Added tests for 4D Dti data and Labels

BUG: Forgot to change libminc git id

BUG: Reduced number of tests

BUG: Updated to latest version of libminc

BUG: Fixed a bug in libminc which affected building MINC2 module

BUG: Addded ability to store floating point data in a MINC2 volume with integer data type

BUG: Updated to latest version of libminc

BUG: Re-enabled test for rounding errors in case of storing floating point data in storage with integer data type

BUG: Fix warnings about unused or uninitialized values.  Add brackets for style consistency.

BUG: Fix uninitialized variable warnings and remove README

ENH: Added IO adapter for MINC style transformations (.xfm files)

ENH: Updated to latest version of libminc and fixed the way libmind is called to make .xfm files

BUG: Fixed errors in building on MacOSX

BUG: Fixed build on Windows

BUG: Second attempt to fix build on Windows

BUG: Suppressed CRT SECURE Warnings on Windows, fixed typo

BUG: Removed more warnings in Windows build

BUG: Fixed integer overflow in libminc

ENH: Rebased to the latest master

BUG: Trying to make build possible

BUG: Fixed bug while building with GCC

ENH: Rebased to current master

BUG: Updated copyright notice

Change-Id: Ie9ed4151dca83d5854cc713536a9594dc520c15a
PERF: couple of speed up improvements for QuadEdgeMesh processing

In QuadEdgeMeshBoundaryEdgesMeshFunction::Evaluate(), change a local
container from std::list<> to std::set<> to improve performance of removing
elements.

In QuadEdgeMesh, make use of GetElementIfIndexExists to avoid doing
too many ::find on the MapContainer.

Change-Id: Ic76674c64c3959f527e68b6c0ce9893deb0e1155
COMP: Adding missing header

WrapITK builds are getting a compilation error from
ProgressReporter not being defined.

Change-Id: I191a02acef380b560c4cd3cc752ec815a9a5f998
Merge topic 'ShapeUniqueMissingHeader'

d134c30 COMP: Adding missing header
ENH: Allow block matching on diff size images

Allow block matching on images of different
dimensions.

Change-Id: Id1d6547b4714499614c1b3fca80b7981ede81326
Merge topic 'BlockMatchImageSize'

8c85bba ENH: Allow block matching on diff size images
STYLE: Enforce using ITK macros when available

During careful review of this calss, some ivars were identified
that could be removed and made local variables of one function.

Identified where a pointer could be made const.

Prefer initialization to assignment for class constuctor.

Logic for printing message about too many interations was moved
to the parent class where the other termination messages are appended
to build up the message string.

Change-Id: I4767db52c0979c85bdf1a482d809e30aa6d1191c
Merge topic 'SpeedUpMeshBoundary'

e5af98c PERF: couple of speed up improvements for QuadEdgeMesh processing
Merge topic 'LBFGSBOptimizerDebug'

71e9fa1 STYLE: Enforce using ITK macros when available
BUG: Using CMake variable in external builds with autoconf environment

Previously, the external projects of FFTW, SWIG and PCRE were affected
by environmental variable such as CC, CXX, CFLAGS etc. The could be
tested by setting CXX=/dev/null in the environment. Additionally,
these setting could change from when cmake was first run to when the
external project was (re)configured and compiled.

Now, the environment variable which effect the autoconf are not set in
via the "env" command before configuration.

Change-Id: Ie2d4f43c10d40186062a2e2917eff26b03b9815c
BUG: initialize InverseCovariance size with degenerate matrix

This patch fixes a segfault with VectorConfidenceConnected when used
with VectorImages and only one initial seed. This was caused by an
inverse matrix not being initialized correctly for variable length
measurement vectors.

Change-Id: I81bd2c9afe35f726d552c08849dd3c80710bca05
Merge topic 'FFTWExternalInEnviroment'

da4ce96 BUG: Using CMake variable in external builds with autoconf environment
Merge topic 'VectorConfidenceConnectedInvCovarSegfault'

b07b051 BUG: initialize InverseCovariance size with degenerate matrix
BUG: Fix InverseDisplacementFieldImageFilter bug

Further description can be found in jira issue (#3009).

A displacement field represent the displacement required to move from image1 to image2 :

image2_position = f(image1_position) + image1_position

Inverting such a field consist in estimating f^-1 such that
image1_position = f^-1(image2_position) + image2_position

at each location of image2 grid, while we in fact know f^-1 only at f(image1_position) + image1_position, which are most likely off image2 grid.

To do so, the InverseDisplacementFieldImageFilter makes use of Splines function, which will interpolate the displacement at image2 grid positions.

The spline transform is given source and target points from the function to estimate, which is f^-1. for each grid position in image1 :

    source point should be f(image1_position) + image1_position
    target point should be image1-image2 = -f(image1)

But in the filter code before this patch, we can read that source point given to the spline is only image1_position, not f(image1_position) + image1_position.

As a result, the inverse function estimated by the spline transform is wrong.

As asked in the review, the filter test has been modified to show the improper behaviour before the patch and the correct behaviour after the patch. Please note that the previous version of the test did not test for output validity, but only for correct execution (no regression testing on algorithm output).

As asked by the last review, I slightly rewrote the filter code to enhance readibility by avoiding confusion between landmarks and displacements.

Change-Id: Iddfb0a4332f12212feaec8a3e54f48c7ce41e272
Merge topic 'fix-inversedisplacementfield'

2b9fca5 BUG: Fix InverseDisplacementFieldImageFilter bug
COMP: Further changes to the use of std::copy_n

1. Add preprocessor test for condition (detected by David
Doria) where ITK was configured & built with a compiler that
supports C++11 std::copy_n, but a user program was not.

2. Small changes suggested by Bradley Lowencamp that didn't
make it into the last patch.

Change-Id: I1635cccc52b2dbf3621b896db9a139f33cda4fe2
COMP: Fix project linking against ITK that does not use VtkGlue.

The problem:

ITK is built with the ITKVtkGlue or ITKLevelSetsv4Visualization module enabled.
A project that uses ITK, but does not use VTK, does a

find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

but if the VTK_DIR that was specified for ITKVtkGlue is at a build tree
location, CMake does not know where to find the VTK libraries.

The solution:

In the per-VTK-module export code, we should include VTKTargets.cmake so CMake
knows where to find the VTK libraries.  To do so, run find_package(VTK_DIR
NO_MODULE REQUIRED) with the VTK_DIR used during ITK configuration.

Change-Id: I6c74891f97da80c1b1ac352b8f7495439c80d610
Merge topic 'LinkVTKGlueNotUsed'

4371df2 COMP: Fix project linking against ITK that does not use VtkGlue.
ENH: Adding numeric_traits specializations for "long long"

This patch applies commits r34558 and r36873 from VXL upstream
authored by Brad King.

Change-Id: Ie233754645f3d4fc434578b5eb0871d3dd74c860
ENH: instantiate vnl types with "long long" on all platforms

This works toward portable instantiation of images with int64_t
types.

Change-Id: Id228cbd38794336898b0b0df06cf9524641d01b0