this is the entirety of a function in MATLAB's #DICOM toolbox #smh