R based medical imaging tutorial