def _generate_regist_command(self, item): """ generate the registration command(s) :param dict item: dictionary {str: str|float} with registration params :return str|list(str): the execution commands """ path_dir = self._get_path_reg_dir(item) config = load_config_args(self.params['path_config']) config = config % { 'target-image': item[self.COL_IMAGE_REF_NII], 'source-image': item[self.COL_IMAGE_MOVE_NII] } cmd = self.COMMAND_REGISTER % { 'config': config, 'antsRegistration': self.exec_register, 'output': path_dir } return cmd
def _generate_regist_command(self, item): """ generate the registration command :param dict item: dictionary with registration params :return str|list(str): the execution commands """ logging.debug('.. prepare DROP registration command') config = load_config_args(self.params['path_config']) path_im_ref, path_im_move, _, _ = self._get_paths(item) path_dir = self._get_path_reg_dir(item) def __cmd(p_target, p_source): command = self.COMMAND_REGISTER % { 'dropRegistration': self.params['exec_DROP'], 'source': p_source, 'target': p_target, 'output': os.path.join(path_dir, 'output'), 'config': config, } return command cmd_direct = __cmd(path_im_ref, path_im_move) + ' --ocompose' return [cmd_direct]