ENH: initialize StudyID
ENH: fixing code and SR issues

* responded to some of the DCMTK code style suggestions from Jörg Riesmeier
* fixed the issues identified by David Clunie (incorrect nesting of the
   measurement, improper use of Mean code)