Ballistic electrons in ferromagnet/semiconductor hybrid structures: From nanomagnetometry to spin injection