Create itk SpatialObject from image with conversion
Create itk SpatialObject from image with conversion

Adding code to create the correct itkSpatialObject from the provided
image, by doing an image cast. It should be possible to create a
spatial object that takes an arbitrary image, including a label map
image, and uses if for the mask.

Change-Id: I05d7567a1c79c3089cad243eca25ee749d118a0b

SimpleITK/SimpleITK,SimpleITK/SimpleITK,blowekamp/SimpleITK,richardbeare/SimpleITK,richardbeare/SimpleITK,richardbeare/SimpleITK,hendradarwin/SimpleITK,SimpleITK/SimpleITK,hendradarwin/SimpleITK,blowekamp/SimpleITK,kaspermarstal/SimpleElastix,InsightSoftwareConsortium/SimpleITK,InsightSoftwareConsortium/SimpleITK,SimpleITK/SimpleITK,hendradarwin/SimpleITK,hendradarwin/SimpleITK,kaspermarstal/SimpleElastix,blowekamp/SimpleITK,richardbeare/SimpleITK,InsightSoftwareConsortium/SimpleITK,richardbeare/SimpleITK,blowekamp/SimpleITK,blowekamp/SimpleITK,hendradarwin/SimpleITK,SimpleITK/SimpleITK,InsightSoftwareConsortium/SimpleITK,SimpleITK/SimpleITK,hendradarwin/SimpleITK,blowekamp/SimpleITK,hendradarwin/SimpleITK,hendradarwin/SimpleITK,InsightSoftwareConsortium/SimpleITK,kaspermarstal/SimpleElastix,richardbeare/SimpleITK,blowekamp/SimpleITK,blowekamp/SimpleITK,SimpleITK/SimpleITK,kaspermarstal/SimpleElastix,richardbeare/SimpleITK,kaspermarstal/SimpleElastix,InsightSoftwareConsortium/SimpleITK,InsightSoftwareConsortium/SimpleITK,SimpleITK/SimpleITK,kaspermarstal/SimpleElastix,kaspermarstal/SimpleElastix,InsightSoftwareConsortium/SimpleITK,richardbeare/SimpleITK