Changing StatisticsImageFilter to be json based.

Delete the manually created filter and create a json description for a
generated filter.

Change-Id: I2d0bb52098778a2a78826f9c6d7a3f2ca29a4a0d
Add json based test for StatisticsImageFilter with cthead1

Change-Id: I23821d03a88c3c9e4c6dcde58217aecd45ea259c
Adding destructor to image filter templates

The default implementation was used before future improvements will
require optional code in this method.

Change-Id: I7586d5b9f18c1a71d3072ec15b6f83827c60eaa4
Convert measurement defaults to strings

Using a json bool value does not work with the lua string concatenate
(..) operator.

Change-Id: Ide2974527bbfa0e8ca18e88807295fb1e07dc3f7
Add an itk::ProcessObject member to filters with active measurements

The new member variable can save the process object executed, to allow
for additional results, measurements or outputs to be accessible after
execution. So these SimpleITK filter will now hold onto the executed
ITK filter after execution. This may result in additional memory
consumption that will need to be addressed.

Change-Id: I290c1f263168f4ec43e07670a4d890b066ce6062
Save filter as member variable for active measurements

The member variable is used to hold a reference to filter before
execution. This enables measurements to be used during execution and
the filter to be held onto after execution for access to the itk
filters member variables.

Change-Id: I6d782974c86796909ab920dcffa59f0e9d22ba99
Add active measurements as std::function objects

Adding member variables as std::function, which hold onto a pointer
for the internal filter. The Get accessor methods are updated to
invoke the function object. And function variable are set before
execution so that they can potentially be monitored during execution.

Change-Id: If8cbc03ef1dce2435549ce50ef784b76b69d4dcc
Use ToStringHelper for active measurement output in ToString method

Change-Id: I73875549266611f2b782de1557952714301d8704
Add support to template for parameters of active measurements

This enable parameters for the SimpleITK filter interface to be passed
to the itk ProcessObject via the function object.

Change-Id: Icd45664421609a7a6e7b6d49bf3c2938464f7466
Adding conversion support for ImageRegion and vectors of ITKVectors

Change-Id: I6f079a0777285dd4e31a55611bfced0d6298c025
adding casting option for active parameters

Add new "custom_cast" option for active parameters. This approach
creates a new object with a method that is used. The the conversion is
done in a second method which allows the user defined casting to know
the input type via implicit template parameter.

Change-Id: Id41fe5f6e635dcd3a2f35920ff7b26d91fe98a8f
add no_return_image option for filters which don't return an image

So called Image sinc type filters don't really return a useful image
in ITK. The make the SimpleITK version return a default constructed
image or an empty image.

Change-Id: I5e2bdf44f26e0348c4e0070dbc93db693d22f5c6
Move custom casts used for measurements to separate template include

Use this include in all image filter templates.

Change-Id: I21b2343bd32f44c445409b92ade64a1e58ee35cd
Add no_return_image support to testing templates.

Change-Id: I1a191c29b0ee4d2ac1a27982a5c0fb76f09f726a
StatisticsImageFilter has no procedural method and returns empty image

Change-Id: I058494e2a369c430ddc9ef763e333f14c906c21a
Improve white space formatting for private declaration template

Change-Id: I80747c5e6690da003986055af63f3a609bb4e6e0
Remove manual LabelStatisticsImageFilter

Change-Id: I8e5d24b3242d26c2394e56888b601cbc0fb97ee6
Remove MeasurementMap

The MeasuremetMap was used by the manually written Statistics and
LabelStatistics filters. It's being remove to allow for a new more
generic approach to be used.

Change-Id: I81bd23c90533a1d022e68e2c7af8d8b541700c91
Adding LabelStatisticsImageFilter as a tempalted json

Change-Id: If424b36eaefe916ece2e25abd4565cceeeee9500
Merge topic 'SIMPLEITK-490_Uset1functionForLabelStatisticsImageFilter' into next

fb146408 Adding LabelStatisticsImageFilter as a tempalted json
1776ee5c Remove MeasurementMap
8cbbf65f Remove manual LabelStatisticsImageFilter
6993db4a Improve white space formatting for private declaration template
fa82d3e7 StatisticsImageFilter has no procedural method and returns empty image
b16627e8 Add no_return_image support to testing templates.
1c8f6333 Move custom casts used for measurements to separate template include
c29b5b28 add no_return_image option for filters which don't return an image
6c38d394 adding casting option for active parameters
6dada944 Adding conversion support for ImageRegion and vectors of ITKVectors
0d46a1d2 Add support to template for parameters of active measurements
45f665e2 Use ToStringHelper for active measurement output in ToString method
e90e53e2 Add active measurements as std::function objects
3fc7137a Save filter as member variable for active measurements
d5bbb879 Add an itk::ProcessObject member to filters with active measurements
66a2048b Convert measurement defaults to strings
...