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
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