Project: datamanagement
Issue DM-4942: Fix type inference and return types makeMaskedImage et al
The {{makeMaskedImage}} function and cousins like {{makeExposure}} don't do the type inference they're supposed to do in C++, because they use the old {{typename Image::Ptr}} approach instead of {{PTR(Image)}}. They also return raw pointers, which is dangerous. They should be converted to return shared_ptrs. Note that this will have to include adjusting or removing Swig code (probably {{%newobject}} statements) that deal with taking ownership of the raw pointers.
Story points: 1