ENH: Added adapter class to use general_transform API from MINC

BUG: Fixed order of parameters passed for storing Affine Transform in XFM

ENH: MINC XFM writer now support any 3D transform based on MatrixOffsetTransformBase

Change-Id: I2e4b4f21ff10359b08a6e502ea3b216776161902
COMP: Invalid conversion detected by clang c++11

Removed private member function that is never used
by the class.

istream::operator>> returns a reference to an istream
that is not convertable to a boolean.

istream& operator>> (long& val);

This test case confirms that this is really invalid code:

cat test_conversion.cpp
\#include <iostream>
\#include <sstream>
\#include <string>
int main(int argc, char * argv[])
{
  typedef long int DataObjectPointerArraySizeType;
  DataObjectPointerArraySizeType idx;
  std::string idxStr = "7";
  return (std::istringstream(idxStr) >> idx);
}

clang++ -std=c++11 test_conversion.cpp

test_conversion.cpp:9:10: error: no viable conversion from 'std::__1::basic_istream<char>' to 'int'
  return (std::istringstream(idxStr) >> idx);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I1979f063af664c7782ddfc73d539973631e13d9c
COMP: Non standard conversion for -std=c++11

A compiler error was encounted for invalid conversion
when compiling in strict c++11 mode.

ITKv4/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx:413:48: error:
      invalid operands to binary expression ('basic_ostream<char, std::__1::char_traits<char> >' and 'const std::ostringstream'
      (aka 'const basic_ostringstream<char>'))
  os << indent << "StopConditionDescription: " << m_StopConditionDescription << std::endl;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ostream:190:20: note:
    candidate function not viable: no known conversion from 'const std::ostringstream' (aka 'const basic_ostringstream<char>')
    to 'const void *' for 1st argument; take the address of the argument with &
    basic_ostream& operator<<(const void* __p);
                   ^

Change-Id: I02535cf4c3dae9152bf03a33e884a62224fa0731
Merge topic 'MINC2_TRANSFORM'

08ebd0f ENH: Added adapter class to use general_transform API from MINC
COMP: Cleanup CMP0022 warnings in GDCM module

CMake 2.8.12 introduces policy CMP0022 that trigger warnings in some of ITK's
GDCM CMake code.  Fix them as follows.  CMP0022 warns when we set the
LINK_INTERFACE_LIBRARIES property directly without also setting the newly
introduced INTERFACE_LINK_LIBRARIES property directly.  Set the new property
to the same value as the old property so that we get the same behavior
regardless of the CMP0022 setting.

Change-Id: I5dcf742ae662763905af8cbb0e64785b95034fc9
Merge topic 'cleanup-CMP0022-warnings'

e92ad0c COMP: Cleanup CMP0022 warnings in GDCM module
Merge topic 'UnusedFunction'

c52c567 COMP: Non standard conversion for -std=c++11
6a6faab COMP: Invalid conversion detected by clang c++11
COMP: Cleanup CMP0022 warnings in GDCM module static build

Do not set INTERFACE_LINK_LIBRARIES on STATIC libraries.

Change-Id: Ib863b8e0e8a994112496ce2c20213a188b8d4dd6
Merge topic 'cleanup-CMP0022-warnings'

32813e5 COMP: Cleanup CMP0022 warnings in GDCM module static build
ENH: Improved writing speed for TIFF images

Previously, in itkTIFFImageIO.cxx rowsperstrip was set to a default
value so that it would be calculated using the STRIP_SIZE_DEFAULT
defined to be 8 kB in tiffiop.h. However, this a very conservative
small number, and it leads to very small strips resulting in many io
operations, which can be slow when written over networks that require
encryption/decryption of each packet (such as sshfs). Conversely, if
the value is too high, a lot of extra memory is required to store the
strips before they are written out. Experiments writing TIFF images to
drives mapped by sshfs showed that a good tradeoff is achieved when
the STRIP_SIZE_DEFAULT is increased to 1 MB. Rather than change that
value in the third party libtiff library, we instead compute the
rowsperstrip in itkTIFFImageIO.cxx to lead to this same value.

This results in an increase in memory usage but no increase in writing
time when writing locally and significant writing time improvement
when writing over sshfs.  For example, writing a 2048x2048 uint16
image with 8 kB per strip leads to 2 rows per strip and takes about
120 seconds writing over sshfs. Using 1 MB per strip leads to 256 rows
per strip, which takes only 4 seconds to write over sshfs.

This has no effect on accuracy, only writing time.  All of the tests
still pass.

Change-Id: Id3a99fbcbcd430e6436dbf262aab2fc70b82937a
BUG: Verify ConfidenceConnected Seeds

Seeds outside image were resulting in segfaults. Now, seeds are
verified that they are inside the region, and if there are no valid
seeds a zero image is return consistent with the other region growing
algorithms.

Change-Id: Idcbf4deda92f417b216ced6fb79c5dc6fbf39c58
BUG: Verify seeds in VectorConfidenceConnected

Prevent segfault from invalid access. Only use valid seeds inside
region, return 0 image if there are no valid seeds. This behavior is
the same as other region growing algorithms.

Change-Id: I3f9d1525d1079502cbf9f44be47f02d385c9c15b
ENH: Check and use C++11 typetraits first

This patch changes the preference to use C++11 std::typetraits over
tr1. The typetraits have been integrated into C++11 in the std
namespace, this standard utilized over the extension.

Change-Id: I5dc9e19e4e7682e4b1c10c3873396386eba7d22b
Merge topic 'Cxx11TypeTraits'

ea13fd1 ENH: Check and use C++11 typetraits first
Merge topic 'ConfidenceConnectedSeedValidate'

18416bb BUG: Verify seeds in VectorConfidenceConnected
9225cb1 BUG: Verify ConfidenceConnected Seeds
BUG: Do not convert to make-escaped path for internal APIs

The KWSys SystemTools::ConvertToOutputPath method can add makefile
escape characters not suitable for passing paths to internal APIs.
Drop calls to it from ITK.

Change-Id: I124d6cea6e004ad47deed17379ca50392c0105b7
COMP: Use memcpy for raw memory copy

CID 1106738 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)

Its a good practice to use memcpy over strncpy for non-null
terminated char sequences.

Change-Id: Icd4373c0528e46f007dba5f3246eb9538ef11867
PERF: fix cppcheck issues in itk::ImageRegion

[Modules/Core/Common/include/itkImageRegion.h:184]: (performance) Variable 'same' is reassigned a value before the old one has been used.
[Modules/Core/Common/include/itkImageRegion.h:195]: (performance) Variable 'same' is reassigned a value before the old one has been used.

Change-Id: Ib03a09a37e92216d8a7ed05891eb2a5bd578858d
STYLE: fix cppcheck style warning

[Modules/Core/Common/include/itkNeighborhoodOperator.hxx:45]: (style) The scope of the variable 'swap_with' can be reduced.

Change-Id: I98f8ab8dde19b8107c3d08ad91c1d2b855fe529a
BUG: Use string constructor which calculates str length

CID 1106758 (#1 of 1): Out-of-bounds access (OVERRUN)

It is preferred to use std::string constructors with count the
c-string length as opposed to manually specifying the length with is
error prone.

Change-Id: Iad6ccb87fb9fba90bf6c13db26284d50662999b2