Decouple the type of input mode of defining the objects (vector data or labelimage) from the type of output produced (vector data, xml file or raster image).
Not implemented yet: vector data output when input is labelimage. I still have not decided how this should be done. Maybe with a UnaryFunctorImageFilter taking the labelimage and generating the output values from the maps containing the stats and then rasterizing the output of this filter?