📄 mccore.h
字号:
/****************************************************************************
* This file is part of tMCimg.
*
* tMCimg is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
#ifndef __MCCORE_H
#define __MCCORE_H
#include "tMCimg.h"
#ifndef MAX
#define MAX(x,y) ((x) > (y) ? (x) : (y))
#endif
#ifndef MIN
#define MIN(x,y) ((x) < (y) ? (x) : (y))
#endif
/* Publicly accessible routines in the core library */
extern void fpusetup(void);
extern void initialize_config(struct Config *);
extern int load2pt(TWOPT_T *, TWOPT_T *, int, int, const char *);
extern int loadconfig(struct Config *, const char *);
extern int loadsegments(const struct Config *, TISSUE ****) ;
extern void move_detectors(struct Config *, const TISSUE ***);
extern void move_sources(struct Config *, const TISSUE ***) ;
extern FILE *openhis(int, const char *, const struct Config *);
extern float ran(int *); /* May require linking with libgsl */
extern void rescale_system(struct Config *);
extern int save2pt(const char *, int,
const TWOPT_T *, const TWOPT_T *, int, const char *);
extern void savehis(const struct Config *, FILE *, double, double, double,
double, double, double, double, float *);
extern float unscale_length(const float, const struct Config *);
extern void *alloc_1d_array(int, size_t);
extern void *alloc_2d_array(int, int, size_t);
extern void *alloc_3d_array(int, int, int, size_t);
extern void *alloc_4d_array(int, int, int, int, size_t);
extern void free_1d_array(void *, int);
extern void free_2d_array(void *, int, int);
extern void free_3d_array(void *, int, int, int);
extern void free_4d_array(void *, int, int, int, int);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -