BUG: Variance and structure tensor fix

Addressed comments.

Fixed code style and addressed comments.

Selection of the appropriate number of blocks according to the fraction
with positive variances only.

Change-Id: Ib08143f67a3d67bb71e3fd601226edb35fbb92c9
Merge topic 'FeautureSelectionBugFix'

b1a9de2 BUG: Variance and structure tensor fix
ENH: Allow removal of all Deprecated code

Remove the ITKDeprecated module from BUILD_ALL_MODULES
when ITK_LEGACY_REMOVE is ON  AND ITKV3_COMPATIBILITY is OFF
to prevent accidental use of the deprecated classes.

All forms of deprecated code must be turned off when
itkLegacyRemove is requested by the developer.
Both Modules/Compatibility/V3Compatibility and
Modules/Compatibility/Deprecated are forms of legacy code.

Where it is clearly known, indicate which class should
be used in place of the legacy code
AddConstantImageFilter        -> AddImageFilter
SubtractConstantImageFilter   -> SubtractImageFilter
MultiplyByConstantImageFilter -> MultiplyImageFilter
DivideByConstantImageFilter   -> DivideImageFilter

Also attempt to differentiate between the "Deprecated"
and the "V3Compatibility" modules.
Deprecated:  Features that are no longer supported in ITKv4.
V3Compatibility: The API has changed for the same Feature.

Matt McCormick:  CMake logic to turn off Deprecated module
David Doria: Use \deprecated for improved documentation

Change-Id: I7fad2eb018bd85bf5c05f9ee07a3e431e9a05650
COMP: Remove unnecessary const_cast.

A re-write allows the the removal of the const_cast
that was only needed because of the signature of the
parent class.  A protected function with the
non-const signature was added to avoid the
need for a const_cast.

Change-Id: Ief60bbfc8b573de570dff521414760cdfa1de9a2
Merge topic 'AllowRemovalOfDeprecated'

e1c2930 COMP: Remove unnecessary const_cast.
4f61266 ENH: Allow removal of all Deprecated code
ENH:  Add GetTransformCategory() to translation transform.

Change-Id: Icd273dfec70ef05dbd6064ca07857356a3ee739d
PERF: couple of performance improvements useful for mesh processing

 * In MapContainer::GetElementIfIndexExists avoid making 2 consecutives find
(std::map<>::count and std::map<>::find),
 * Several performance improvements in QuadEdgeMeshPolygonCell, QuadEdgeMesh
(e.g. caching the "end" iterator).

Change-Id: I9eaaf1460ddfc8d27d7083d909a5cba38388fe8f
Merge topic 'TranslationIsLinearCategory'

158a5dd ENH:  Add GetTransformCategory() to translation transform.
COMP: Macro definition of None in X11 breaks enum

None is defined in /usr/include/X11/X.h. On some platforms this
results in a compilaton error because None is used in an enum. This
patch replaces the None designation with a more meaningful enumeration
for specifying an UnknownTransformCategory.

Change-Id: I82afc34a3137660edc72fa15d118fef0d93e7d23
Merge topic 'Perf_MeshProc'

28d6230 PERF: couple of performance improvements useful for mesh processing
Merge topic 'MacroDefinitionConfoundsEnum'

63b1a7d COMP: Macro definition of None in X11 breaks enum
ENH: Add "WithOnlyIndex" iterators.

Adding several new image iterators that do not access image data,
and thus can be used with type ImageBase. The motivation is to
be able to use ImageBase to store virtual domain information in
the v4 metrics. They require iterating over the virtual domain,
and thus need iterators that can work with ImageBase.

Also, improved itkImageIteratorWithIndexTest to properly return
false when it fails, and to test a little more thoroughly.

Change-Id: Ic13b7d0850398f27df298ba3174beb1fbb136d98
ENH: Adding exponential transforms.

First attempt at designing exponential transforms
to be used with ITKv4 registration.  The
ExponentialTransform class implements the standard
Gaussian smoothing for a diff. demons like algorithm
(with arbitrary metric).  The B-spline version uses
a B-spline smoothing operation to give a different
transform type but still using the exponentiation
operation on the velocity field.

Change-Id: I7e0c4829a73b551175c05f32578ba641bedc5bef
Merge topic 'ExpTransforms'

2a5dfa5 ENH: Adding exponential transforms.
BUG: GPU tests sometimes fails

GPUGradientAnisotropicDiffusionImageFilterTest2D was failing on a
certain Mac OS X 10.7.2 and 10.7.4 configuration even though the 3D
version passed there and the 2D version passed on the same hardware
with OS X 10.6.8.  After much effort, it was determined that this
patch fixes the problem.  It had been documented that Apple OpenCL
implementations weren't handling nested if statements like if(A && B
&& C), but in this case, the implementation wasn't working for if (A
&& B).  Breaking into two individual statements seems to work, but it
is not clear whether other compound if statements are affected.  Right
now, they seem to be working.

However, this compound if statement could be the issue for
GPUMeanImageFilterTest3D which is failing on other Mac
configurations.  Therefore, this patch cleans up those compound if
statements as well.  The GPUMeanImageFilterTest has also been modified
to output the result images in case this patch does not fix the problem.

Change-Id: Ia13343bc557b77b53abfb3da4a091d11d87a34a1
Merge topic 'GPUMeanImageFilterBug'

a0c39bf BUG: GPU tests sometimes fails
Merge topic 'WithOnlyIndexIterators'

8703c0a ENH: Add "WithOnlyIndex" iterators.
PERF: Pull expensive GetInput/GetOutput calls out of inner loops

Between ITK3 and ITK4 a new scheme was set up for managing filter
inputs and outputs by name instead of by index.  This has made
the GetInput & GetOutput methods much slower. This has had a
serious performance penalty in several filters who call these
functions in inner loops.  In some cases this is a
straightforward fix, in others the input and output handles need
to be cached at the class level.

The fixes in this patch were accomplished by instrumenting the
ProcessObject methods and throwing an exception if they were
called an unreasonable number of times.  I started with a
threshold of 100,000 and after an initial pass, decreased this to
2000, at which point 'false positives' showed up.

Outstanding Issue:

PipelineMonitorImageFilter::PropogateRequestedRegion
Test Failure: itkJoinSeriesImageFilterStreamingTest
Solution: Cache pointers to input and output
Problem: Not sure where these could be initialized in such a way
that they would be updated if the input or output changed.

BinaryFunctorImageFilter::ThreadedGenerateData
Test Failure:  itkLabelMapContourOverlayImageFilterTest2
Solution: Cache input/output, possibly in BeforeThreadedGenerateData
Problem: I suspect that the test failure arises more from the
re-use of an instance of SubtractImageFilter, than any actual
problem of over-use.

WarpVectorImageFilter::GenerateInputRequestedRegion
Test Failures: itkDiffemorphicDemonsRegistrationFilterTests
(those numbered 01,02,03,04,05,06,07,09,10,11)
Solution: Not clear if one is needed; or if a simple fix is
possible.
Problem: itkExponentialDisplacementFieldImageFilter::GenerateData
uses a sort of a mini-pipeline; in a loop it re-uses the same
instance of WarpVectorImageFilter.  This racks up the count of
calls to GetInput/GetOutput in
WarpVectorImageFilter::GenerateInputRequestedRegion. It might be
good to go back and re-examine how this filter is built.

Change-Id: I2a92882098be6e8d026ff92d3de057f049b55cc7
Merge topic 'GetInputGetOutputPerf'

5632101 PERF: Pull expensive GetInput/GetOutput calls out of inner loops
STYLE: Remove all references to StartRegistation

The comments in the code from 2008 indicate that the
StartRegistration method should not be used, and that
the "Update()" command is the preferred method for intiating
a registration.

All documentation and references to "StartRegistration" have
been replaced and now reference Update().

Change-Id: I784f86c854aa5d8535eae2f74d4c364919d6e7e5