adapted function_DTI_CHARMED_flirt_custom_template to new structure