ENH: Add parameter weighting option to Optimizersv4

A per-parameter weighting array can optionally be used to
mask or otherwise alter optimization behavior separately from
optimization scales.

Also, fix MultiGradientOptimizerv4. It was effectively running
the optimization with 2xN iterations instead of N.

Also, add option to Optimizerv4's StartOptimization() method
to only perform initialization and not start optimization loop.

Change-Id: I70995f038b47883dece271913327725becb15115
ENH: Allow change of tolerance in ImageToImageFilter

itk::ImageToImageFilter used a fixed tolerance for comparing
the spaces defined by input images' directions+origin+spacing.
This patch introduces methods to set the direction and
coordinate tolerances.

Change-Id: Ic8bdd0958257b853c874fd3861f5e32c52e3271a
ENH: Enabling support for system lib versions prior to TIFF 4.0.0

Unfortunetly the TIFFLIB_VERSION is not suitable for determining if
libtiff contains the features for big tiff files. Instread the newly
add TIFF_INT64_T defined is use to detect >=libtiff4. The original
versions of the methods are used when <libtiff4.

Change-Id: Ic2e2d5a8af733998950b8a9b4e2085ce73db38ac
KWSys 2012-11-08 (3b17de34)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 3b17de34 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' df32fa6f..3b17de34
Brad King (1):
      3b17de34 SystemInformation: Do not dereference NULL ifa_addr

Change-Id: I5600ebbf9469010a524aae848d8011f9f17bbefa
Merge branch 'upstream-kwsys' into update-KWSys

Change-Id: I13bbb45c2c206913b106c91a0361f99d18706aa8
Merge topic 'update-KWSys'

64097ad Merge branch 'upstream-kwsys' into update-KWSys
434d978 KWSys 2012-11-08 (3b17de34)
Merge topic 'SupportSystemTIFF3'

8e802e5 ENH: Enabling support for system lib versions prior to TIFF 4.0.0
STYLE: Fixed numerous style error in PatchBased denoising

The following command was run:

uncrustify -c
~/src/ITK-gerrit/Utilities/Maintenance/uncrustify_itk.cfg -l CPP *.hxx
*.h --replace

Change-Id: Ieec9d7471ddc7b13f1df917cdb91d48b4ef5e661
ENH: updating to libtif 4.0.3

The following procedure was followed for updating the library.

Downloaded latest tar ball from:
http://www.remotesensing.org/libtiff/

cd Modules/ThirdParty/TIFF/src/itktiff
copies files from
       tiff-4.0.3/libtiff/*
       to
       ./

git checkout tif_config.h.in
git clean -f ./
sed -i '' 's/\t/  /g' $(find ./ -type f)
sed -i '' 's/ *$//' $(find ./ -type f)

The the following include were changed to ITK's:

-#include "jpeglib.h"
-#include "jerror.h"
+#include "itk_jpeg.h"

-#include "zlib.h"
+#include "itk_zlib.h"

-#include "tiffconf.h"
+#include "tif_config.h"

Change-Id: Ifc2297cf1933664d9b45d5118cf489be6af5e958
Merge topic 'FixPatchBasedDenoisingStyle'

ff2ff5e STYLE: Fixed numerous style error in PatchBased denoising
BUG: Prevent MetaIO vessel tube from getting stuck in while loop

On some platform, the reader got stuck in the while loop. For some
reason, it seems the "eof()" method isn't working as expected while
the "good()" one is.

This patch has been done while working on Slicer issue #2734
See http://na-mic.org/Mantis/view.php?id=2734

Suggested-by: Matt McCormick <matt.mccormick@kitware.com>
Merge topic 'ImageToImageFilterToleranceAccess'

5011312 ENH: Allow change of tolerance in ImageToImageFilter
BUG: Internal factory must use RegisterFactoryInternal method

If just RegisterFactory is called to register an internal factory,
this will cause the dynamic libraries to be loaded during static
initialization. This is undesired behavior and may cause a race
condition of shared libraries loading other shared libraries.

Additionally, applications have been setting ITK_AUTOLOAD path during
executing, before any object were created or other objects
registered. This patch restores the behavior of the dynamic libraries
being loaded with this usage.

Change-Id: I88433ba6e0bcc1885c5e11a54307d0e6c481f85e
COMP: Fix the wrapping for some modules

I have found out that some primarily the convolution and deconvolution
filters have restrictions in dimensional applicability. Additionally the
VtkGlue classes have concept checking which allow only dimensions 1,2 and
3.
A TypedefMacros.cmake bug was fixed to support giving a dimensions list as in
the convolution *.wrap.
Also /bigobj is necessary for proper compilation in VS2005 and higher and
was fixed in ITKSetStandardCompilerFlags.cmake.

VtkGlue wrapping needs vtkPythonCore to link to.

Change-Id: I30912790e76c1de2aa6475b52dd4fae34dbb8573
Merge topic 'FixInternalFactoryRegistration'

39b4ab3 BUG: Internal factory must use RegisterFactoryInternal method
DOC: Document spacing/direction tolerance access methods.

Change-Id: I9472d9b09ccc0b3307e21b8de59ef67d6c4378d7
BUG: Fix Wrapping FFTWComplexToComplex

When FFTW was enabled with complex of both float and double errors
would result. This patch addessed that issue.

Change-Id: I8613bde07283b72abb50ee8f3df889c45db8712a
BUG: Fix compilation ofswig external project

There were two fixes applied here. First installation was happening
twice dues to the additional swig-install target. Second the prefix
path was the same as the installtion. The errors occured with highly
parallel builds.

Change-Id: I5a8125f522f2b14b61a6023f910694bfcf2d1050
Merge remote-tracking branch 'jcfr-github/fix-metaio-vessel-tube-reader-stuck-while-loop-3.20' into release-3.20

Change-Id: Ie51188c69225a1f1cc8610b277b0f0be5b4fbed2
Merge topic 'ImageToImageToleranceDocumentation'

b1d44da DOC: Document spacing/direction tolerance access methods.