BUG: AntiAliasBinaryImageFilter needs SetUseImageSpacing(false).

ITK-3034.

From Roman Ramseyer:

  The itkAntiAliasBinaryImageFilter should probably SetUseImageSpacing(false)
  for ITK4.2
  since itkFiniteDifferenceImageFilter sets m_UseImageSpacing to true by
  default.
  It makes sense that a DifferenceFilter has this on by default but not all
  inherited filter might want this?
  This was not the case for ITK3.2 (there default was already set to false)
  and AntiAliasFilter was just working fine since it can not take image
  spacing into account.
  Otherwise there are artefacts in the direction with the biggest spacing.
  Example
  Use 3d binary image with 2mm spacing in z and apply AntiAlias (iteration 30
  / rms 0.001) filter and then analise output. Then output has
  heavy spikes in z-Direction.

This patch set the flag off in the constructor, and
improve the test so it validates outputs.

Change-Id: I5b2b16e3201d8901ec6a12b1791dea446a4b62b0
ENH: Added radiusIsParametric  mode to FlatStructuringElement

This patch introduces an optional flag called
"radiusIsParametric" to the "ball" and "annulus" structuring
elements of FlatStructuringElement.  Setting this flag to true will
generate structuring elements with more accurate areas, which can be
especially important when morphological operations are intended to
remove or retain objects of particular sizes.

This mode was introduced because the original ball and annulus
structuring elements have a systematic bias in the radius of +0.5
voxels in each dimension relative to the analytic definition of the
radius.

We recommend using this mode for more accurate structuring elements.
However, this mode is turned off by default for backward
compatibility.

Examples:
For a 3D ball of radius 5 should have an area of 523. With this mode
turned on, the number of "on" pixels is 515 (error 1.6%), but with it
turned off, the area is 739 (error 41%).

For a 3D annulus of radius 5 and thickness 2, the area should be 410.
With this mode turned on, the area is 392 (error 4.5%),  but when
turned off it is 560 (error 36%).

This same trend holds for balls and annuli of any radius or dimension.
For more detailed experiments with this mode, please refer to the
results of the test itkFlatStructuringElementTest.cxx or the wiki
example.

Change-Id: If7b2f654de396771beb49b6736eae57b28445eed
BUG: Use KWStyle's GCC-style output for pre-commit style check

The GCC-style output is less confusing for humans to read, and is
consistent with the test that the dashboard will run.

Change-Id: I2fcf83a157000196df12ff9d2a97939d0a050c9a
BUG: Fixed bugs in Modules/IO/MINC and Modules/ThirdParty/MINC

BUG: Fixed double free in MINCImageIO

BUG: Fixing building when using sytem installed LIBMINC

ENH: Updated to lates version of libminc

STYLE: Removed some commented-out code

Change-Id: I292c575d4a18b6068fd558b60907c29107dbec08
ENH: Added adapter class to use general_transform API from MINC

BUG: Fixed order of parameters passed for storing Affine Transform in XFM
Change-Id: Id84dfe088fedbf5312e2a7f009071dc1bd109b8a
BUG: TvirtualImage mismatch in registrationV4 and metric object

Consider a situation that we want to register two float images using a
double type transform.
We instantiate our metric as an object of itkImageToImageMetricv4 class
or one of its derived classes.
In the definition of the metric classes, the TvirtualImage is set to TFixedImage,
and the InternalComputationValueType is set to double by default.
Therefore, in the case of our example, the metric object has the type of:

  itkImageToImageMetricv4< Image<float,Dim>,
                           Image<float,Dim>,
                           Image<float,Dim>,
                           double>                  (1)

The above metric object is set to the itkImageRegistrationMethodv4
class as its base class type:

  itkObjectToObjectMetricBaseTemplate<double>

because the metric type in ITKv4 registration framework is defined as:

  typedef itkObjectToObjectMetricBaseTemplate<RealType> MetricType;

Where the RealType comes from the output transform type:

  typedef typename OutputTransformType::ScalarType RealType;

That is "double" in our example.

Inside the registration framework, the above MetricType object should be
casted to the ImageMetricType that is defined as:

  itkImageToImageMetricv4< Image<float,Dim>,
                           Image<float,Dim>,
                           Image<double,Dim>,
                           double>                  (2)

As in ITKv4 registration method class, we have:

  typedef ImageToImageMetricv4<FixedImageType, MovingImageType,
                              VirtualImageType, RealType> ImageMetricType;

Where the virtual image type is defined as:

  typedef Image<typename ObjectToObjectMetricBaseTemplate<RealType>::ParametersValueType,
               ImageDimension>   VirtualImageType;

That in our example, the RealType is double and the virtualImageType
have the type of: Image<double,Dim>.

Obviously a dynamic cast from (1) to (2) will be failed and causes a
segfault in current version of ITK.

To avoid this issue, we should have consistent definitions for the
virtualImageType in the metric classes and RegistrationMethodv4 class.
Therefore, we should be able to pass the VirtualImageType to
the ITKv4 registration framework as a template parameter that is set to
TFixedIamge by default the same as metric classes.

A new test is added to ITKv4 to show above bug. This test returns
failure with current version of ITK; however, it will be passed after
applying the changes introduced by this patch.

Change-Id: I06e6f8fcee8e7e54f23e0e05054be77495f82c68
Merge topic 'Precommit-KWStyle'

5fd862c BUG: Use KWStyle's GCC-style output for pre-commit style check
Merge topic 'MINC2_TRANSFORM'

7127856 ENH: Added adapter class to use general_transform API from MINC
7663e0b BUG: Fixed bugs in Modules/IO/MINC and Modules/ThirdParty/MINC
Merge topic 'AntiAlias'

8aa5904 BUG: AntiAliasBinaryImageFilter needs SetUseImageSpacing(false).
DOC: Correct DICOM Tag List Formatting

Format the list of DICOM tags correctly in LaTeX for ITK Software Guide.

Change-Id: I174db7b16e47361fa35310a904338b51cca48155
STYLE: check dynamic cast validation in ITKv4 Registration

It is checked whether a dynamic cast returns a Null pointer and a
meaningful message will be printed on screen.

Change-Id: I3f3e0206a5b44b6e05f32b98665a7122f36a629c
Merge topic 'DicomSeriesReadImageWrite2LaTeXComments'

cbf16d1 DOC: Correct DICOM Tag List Formatting
Merge topic 'checkDynamicCasts'

0b427f0 STYLE: check dynamic cast validation in ITKv4 Registration
Merge topic 'virtualImageTestPass'

2823465 BUG: TvirtualImage mismatch in registrationV4 and metric object
Merge topic 'FlatStructuringElementForegroundHasAccurateArea'

789954b ENH: Added radiusIsParametric  mode to FlatStructuringElement