BUG: Fix itk_module_config for repeated calls

Fix use of _${ns}_${mod}_USED settings to block reporting a module more
than once in a single itk_module_config call.  Do not leak the
_${ns}_${mod}_USED settings outside a single call to itk_module_config
so that a future call to the macro with the same ${ns} will use a fresh
set of modules.

Change-Id: I422e415f45db877512a0dcd3c588d9f74d32f515
BUG: Use -py3 when building wrapping for Python 3.

Change-Id: I76475c83204305f4c3d0268851f3ca7356b2690f
ENH: Add IOTransformDCMTK Remote module.

Change-Id: Ieaf3854139762b8b11309d9f67a218d95ff53b7f
BUG: Remove Zeiss 2-channel support code in TIFFImageIO ( and LSMImageIO )

There are no tests for this branch of code. It only works in 3D under
certain cases. There are apparent bugs in the code such as not setting
all of the input image, and logically dead branches. Some downloaded
test images for similar described format do not load. This may effect
files with the extensions tif, tiff, or lsm.

Removal of this code will enable expansion of the current code to more
generically support multi-sample per pixel images.

For more robust reading of this type of image the SCIFIO remote
module should be used.

Change-Id: Idb98d69538db3bc8520881ea4a5e22476238c41e
ENH: Refactor method to convert RGBA image to output buffer

BUG: Address overflow issue when computing page offset with
TIFFReadRGBAImage method.

Extract repeated code to convert from ReadRGBAImage to output image
type.

Change-Id: Ia90b5e104f22c77493b8a4cd5bf640fd793b8b4b
ENH: Refactor duplicated code to read a page

Created a method to read a single page or sub-image in a tiff
file. Simular code was both in the ReadVolume method for 3-d and the
Read method for 2-d. The code block from ReadVolume was used because
it contained more typed cases. There for this patch does improve the
2d reading capabilities for tiffio, so that they are consistent with
the 3d.

Change-Id: I0fbfb19f04435a703bb3fa09ea4e79179592e443
COMP: Fix various Coverity warnings

Looking through the Coverity warnings, almost all
were low hanging fruit, so I fixed several.

Change-Id: I76f2b8b45229d98729de6f63f2ef86a969749235
PERF: Add non-blocking mutex locking.

There are cases where it is benificial to have a
non-blocking mutex locking mechansim.  In particular,
when multiple threads need to accumulate on a single
buffer, it is nice for each thread to keep doing local accumulations
until there the global accumulation buffer is available.

This patch add non-blocking locking mechanisms to the various ITK
Mutex schemes.  The TryLock() member function was added that returns
true of the Lock was captured, and false if it had been locked by another
process.

STYLE: Remove redundant unreachable code

There is a master ifdef conditional in itkMutexLock.cxx that optionally
includes the proper NoThread|PThread|Windows definitions of the Mutex
locking member functions.  The original code had placed the
implementations in #ifdef statements of the NoThread version.  This is
wrong since that highly convoluted file was split into the easier to
maintain 3 separate files.

Change-Id: Ib3dccac4dfe62b1f47eb6e6c8c5307ded6d9e813
ENH: Use TryLock minimize thread stalls

This now uses the TryLock mechansim on each subsection so
that whichever section is capable of being processed is
done as soon as possible. A new variable is put into place
to keep track of which subsections are completed.

Isolate common variables to the top of the function.

Change-Id: I736392fc19b504623c0de51f51a1188cc9083d38
BUG: ThreadedIndexedContainerPartitioner is inclusive

The ThreadedIndexedContainerPartitioner provides ranges that are
inclusive of their end points.  This means that one must provide the
proper enpoint (i.e. size -1 ) and ensure that the number of threads
(partitions) does not exceed the number of elements in
the indexed container.

Change-Id: I1ae7ed8487abb2350fb7b2e7df2feac00e2bca59
BUG: Fix right oriented tiff images

The TIFFImageIO::ReadGenericImage method correctly handled top-left
oriented images, and bottom-right image, however images oriented with
right were non-correctly handled. These cases are now handled
correctly by the TIFFRGBAImage generic path.

New test images of the cthead1 image were added which have been
flipped the to the different orientation, and the matching orientation
tag specified so that they should all be read as equivalent
images. These have been added as a test case.

Change-Id: I058382d6d2e18341ab87edd165490be2187c1d15
BUG: Remove dead separated plannar code, add test

The PLANARCONFIG_SEPARATE block in TIFFImageIO::ReadGenericImage, was
preceded by a unreachable due to a conditional and exception
check. Support for this configuration remains in the TIFFReadRGBAImage
method. A test for the configuration has been added.

A new input image is added from the from the libTiff test images:

PlanarConfiguration = 2 (separated samples)
-------------------------------------------
oxford.tif      601x81 8-bit RGB (lzw) screendump off oxford

Change-Id: Ibb874f80809b70b1aee7a2c9ff1fc8544ed56c04
COMP: Wrap MeshBase templates

Fixes warning:

ITK type not wrapped, or currently not known: itk::CellInterface<double, itk::CellTraitsInfo<2, double, double, unsigned long, unsigned long, unsigned long, itk::Point<double, 2u>, itk::VectorContainer<unsigned long, itk::Point<double, 2u> >, std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > > >::MultiVisito

Change-Id: I80de77442212f88afd564aa8bf7576da76c02d24
Merge branch 'release'

Change-Id: Ibebbd46e58b7bcda7f9f166d7f5580560c798155
ENH: Include TIFF tags in the MetaDataDictionary

Add contribution from the Insight Journal:
http://hdl.handle.net/10380/3170

Change-Id: I20b02394d92c421bad75c5d0af496a6e80089ac0
STYLE: Fix minor kwstyle defects in test and test results

Change-Id: I4b2641d31acb5c764de4041bb7d21c08b3c99846
STYLE: Improve style of HoughTransform2DLinesImageFilter example.

Remove unneeded include.

Use ImageRegion copy constructor. Use more complete and concise
itk::Image::CopyInformation.

Use EXIT_SUCCESS and EXIT_FAILURE macros.

Change-Id: I59c590688875e9e66a8e6b7617c88a2ea13273ab
COMP: Use ConceptChecking for IterativeInverse dimension check.

For:

/home/matt/src/ITK/Modules/Compatibility/V3Compatibility/include/itkIterativeInverseDeformationFieldImageFilter.hxx:54:40:
warning: self-comparison always evaluates to true [-Wtautological-compare]
  if ( ! ( TInputImage::ImageDimension == TOutputImage::ImageDimension ) )

Change-Id: I4df90797780d9a9cc07de14723a2f577b07444e5
Merge topic 'FixTIFFIONonArrayDeleteOperator_release'

795c71ab BUG: Use array delete operator for array new allocations
BUG: Use array delete operator for array new allocations

Change-Id: Ic9bc3c3792083a1a1b3fd842486a7436a4086150