BUG: Use tolerant float compare when choosing better otsu threshold

The last bit of the double precision variance between threshold is
likely numeric noise and not consistent. The improvement should be
better than this potential error to improve consistent results.

Change-Id: I5dbefb32d53a4cb17fe215f0cce437c492a00c2e
Merge topic 'OtsuTolerance'

defdd992 BUG: Use tolerant float compare when choosing better otsu threshold
PERF: Remove non-threadable algorithm components

During testing of thread optimization, some of the accumulation
operations were determined to be less efficient in each thread than
to just do them in single threaded mode.  The complicated code
constructs for having multiple threads remained in the single threaded
code parts.

The per thread PDF accumulations no longer need to be sub-divided
over the thread "BinStart[thread]-BinEnd[thread]" partitioning.

Change-Id: I5ae4461cfcf4ea2be7f32fdbf4d19764d169b12e

The vector of thread variables for the JointPDFSum were never
used in the threads.  Converted to a single value for simplifying
the code.

Change-Id: I952a01e4002707a067d1928af06173fea3d682bc
PERF: Remove perthread block accumulation

The accumulation phases of this algorithm are all occuring inside
of non threaded code sections.  There is a note stating that the
threaded implmentations of the accumulation process was not faster
than the single threaded version (presumably due to overhead issues).

Remove unnecessary block definition per thread variables:
m_ThreaderJointPDFStartBin[threadId]
m_ThreaderJointPDFEndBin[threadId]

Change-Id: Id14daf5d271928e0f38b46b7fc7c1c79eb65939a
COMP: Add tolerance for comparing floating point

The multi-threaded accumulation can not ensure the order of the accumulations
and very slight differences can occur depending on the order of thread
processing that is done.  A very small tolerance was added to the test
to accomodate these very slight differences.

Change-Id: I9acc95f85bd269d2d8954535e2c94bee4409fa5e
ENH: Improve debugging statements for test.

Change-Id: Iea252bd28cc809261c3ce67c0dab85ac8b3bcb17
ENH: Improve test with timing and variables size image.

Testing can require using larger sized images and a view of the performance
is needed in the test.  This patch adds timing for computing the metric
and the ability to more easily change the size of the images being tested.

Change-Id: I70e43c16e398de6c5d1c78b3cc7a00686903806b
PERF: Remove large foot print of PDF derivatives.

ITK-3286 Describes that the memory footprint is very
large for many threads and MattesMutualInformation
due to the amount of memory being allocated per thread.

This is also the most time consuming portion of the
MI algorithm and drastically restricts the
scalability of the algorithm to many threads.

Change-Id: I80dfdd4b9417f98ea1c77ed69b313fc22f95a734
WIP: This is 10 times slower than the previous implementation.

Change-Id: Ibae57fed8e59ac350a88c55d37ca9540d78d4163
WIP: Increase the number of locks used to decrease contention.

Change-Id: I995b489c4ba0b24c011178ec1cbf92fd069e6f53
WIP: ALSO DOES NOT WORK.

Change-Id: Ic1f0752ea06b674494491d6abf269efe78497161
WIP: Passes Tests.

Change-Id: Ib3a7ec2b07cb1f32e339f6aef573edd8f5f4e939
WIP: Seem to work.
WIP: FIXED zero buffer.

Change-Id: I8721bc75ab1ca24e3a63354c9d616f7196eb1923
ENH: Performance Enhancments for minimizing number of memory bufers needed to avoid false sharing.
ENH: Added iterables instead of for loops for performance.

Change-Id: I78cd58197e23faf3a73fd4ca08703fc66fc932d7
WIP: Removed first level of notes and documentations.

Change-Id: I04513906deec21f731c48a98913142c35dd03699
PERF: Avoid unnecessary allocations

Each computation of a point was previously allocating new
memory.  This patch set checks if the currently allocated
memory is the proper size, and then re-initalizes that
memory if possible.

Change-Id: I460403346d4127b4d19f9806e2f752d61b8c7c5e
WIP: Another stable resize avoidance point.

Change-Id: I85cb1e6a24da066164af7e5dff75bf9a227b0a2c
ENH: REMOVE POINTER for manager.

Change-Id: Ia6a4b8f8432f61f5476242c9ec22e327dbd8b9da