「lmrcImageCorrelation(API)」の版間の差分
提供: Eospedia
| 行4: | 行4: | ||
== 構造体 == | == 構造体 == | ||
| + | ===相関方法=== | ||
typedef enum lmrcImageAutoRotationCorrelationMethod { | typedef enum lmrcImageAutoRotationCorrelationMethod { | ||
lmrcImageAutoRotationCorrelationMethodRotationAndCorrelation = 0, | lmrcImageAutoRotationCorrelationMethodRotationAndCorrelation = 0, | ||
| 行10: | 行11: | ||
} lmrcImageAutoRotationCorrelationMethod; | } lmrcImageAutoRotationCorrelationMethod; | ||
| + | ===相関情報=== | ||
typedef struct lmrcImageAutoRotationCorrelationInfo { | typedef struct lmrcImageAutoRotationCorrelationInfo { | ||
int iter; /* iteration */ | int iter; /* iteration */ | ||
| 行35: | 行37: | ||
int flagXshiftOnly; | int flagXshiftOnly; | ||
int flagNoShift; | int flagNoShift; | ||
| − | |||
} lmrcImageAutoRotationCorrelationInfo; | } lmrcImageAutoRotationCorrelationInfo; | ||
| 行46: | 行47: | ||
} lmrcImageCorrelationRefinementInfo; | } lmrcImageCorrelationRefinementInfo; | ||
| + | ===回転モード=== | ||
typedef enum lmrcImageAutoRotationCorrelationForManyReferencesRotationOrder { | typedef enum lmrcImageAutoRotationCorrelationForManyReferencesRotationOrder { | ||
lmrcImageAutoRotationCorrelationForManyReferencesStackOrderRot1Rot2Rot3=0, | lmrcImageAutoRotationCorrelationForManyReferencesStackOrderRot1Rot2Rot3=0, | ||
| 行105: | 行107: | ||
} lmrcImageAutoRotationCorrelationForManyReferencesInfo; | } lmrcImageAutoRotationCorrelationForManyReferencesInfo; | ||
| + | ===PVM=== | ||
#ifdef PVM | #ifdef PVM | ||
| − | |||
typedef struct lmrcImageCorrelationPVMInfo { | typedef struct lmrcImageCorrelationPVMInfo { | ||
int* tids; | int* tids; | ||
int numTask; | int numTask; | ||
} lmrcImageCorrelationPVMInfo; | } lmrcImageCorrelationPVMInfo; | ||
| − | |||
#endif | #endif | ||
| 行122: | 行123: | ||
extern void lmrcImageCorrelationRefinement(mrcImage* cor, mrcImage* shift, mrcImage* in, mrcImage* ref, lmrcImageCorrelationRefinementInfo* info, long mode); | extern void lmrcImageCorrelationRefinement(mrcImage* cor, mrcImage* shift, mrcImage* in, mrcImage* ref, lmrcImageCorrelationRefinementInfo* info, long mode); | ||
| + | ===PVM=== | ||
#ifdef PVM | #ifdef PVM | ||
extern void lmrcImageCorrelationServerStart(lmrcImageCorrelationPVMInfo* linfo, FILE* fpt, int numTask); | extern void lmrcImageCorrelationServerStart(lmrcImageCorrelationPVMInfo* linfo, FILE* fpt, int numTask); | ||
| 行133: | 行135: | ||
extern void lmrcImageAutoRotationCorrelationInfoSendByPVM(lmrcImageAutoRotationCorrelationInfo* linfo, int tid, long mode); | extern void lmrcImageAutoRotationCorrelationInfoSendByPVM(lmrcImageAutoRotationCorrelationInfo* linfo, int tid, long mode); | ||
extern void lmrcImageAutoRotationCorrelationInfoRecieveByPVM(lmrcImageAutoRotationCorrelationInfo* linfo, int tid, long mode); | extern void lmrcImageAutoRotationCorrelationInfoRecieveByPVM(lmrcImageAutoRotationCorrelationInfo* linfo, int tid, long mode); | ||
| − | |||
#endif | #endif | ||
| + | |||
extern void lmrcImageAutoRotationCorretionForManyReferences(mrcImage* in, mrcImage* ref, | extern void lmrcImageAutoRotationCorretionForManyReferences(mrcImage* in, mrcImage* ref, | ||
2014年5月9日 (金) 08:38時点における版
DataManip/mrcImage/src/lmrcImageCorrelationはmrcImage同士での相関を行うのためのAPI です。mrcImageCorrelationやmrcImageAutoRotationCorrelationだけでなく、クラスター解析など画像間の関係を定義したい場合でも使用します。
定数
構造体
相関方法
typedef enum lmrcImageAutoRotationCorrelationMethod {
lmrcImageAutoRotationCorrelationMethodRotationAndCorrelation = 0,
lmrcImageAutoRotationCorrelationMethodRotationAndCorrelationSSDA = 1,
lmrcImageAutoRotationCorrelationMethodRotationalFunction = 2
} lmrcImageAutoRotationCorrelationMethod;
相関情報
typedef struct lmrcImageAutoRotationCorrelationInfo {
int iter; /* iteration */
int nRot; /* Rotation */
lmrcImageAutoRotationCorrelationMethod Method;
float max;
float maxTheta;
mrcImageParaTypeRealCoord maxP;
mrcImageInformation corInfo;
lmrcImageSSDAInfo SSDAInfo;
float EuclidDistance;
float LinearCorrelation;
/* Restriction Rotation Area */
int flagRestrictionArea;
float thetaMin;
float thetaMax;
int flagShiftRange;
float shiftMinX;
float shiftMinY;
float shiftMaxX;
float shiftMaxY;
int flagXshiftOnly;
int flagNoShift;
} lmrcImageAutoRotationCorrelationInfo;
typedef struct lmrcImageCorrelationRefinementInfo {
mrcImageParaTypeRealCoord shift;
mrcImageParaTypeRealCoord step;
mrcImageParaTypeRealCoord range;
mrcImageInformation corInfo;
int mode;
} lmrcImageCorrelationRefinementInfo;
回転モード
typedef enum lmrcImageAutoRotationCorrelationForManyReferencesRotationOrder {
lmrcImageAutoRotationCorrelationForManyReferencesStackOrderRot1Rot2Rot3=0,
lmrcImageAutoRotationCorrelationForManyReferencesStackOrderRot3Rot2Rot1=1
} lmrcImageAutoRotationCorrelationForManyReferencesStackOrder;
typedef enum lmrcImageAutoRotationCorrelationForManyReferencesRefinementMode {
lmrcImageAutoRotationCorrelationForManyReferencesRefinementModeLinear =0,
lmrcImageAutoRotationCorrelationForManyReferencesRefinementModeSetMode =1
} lmrcImageAutoRotationCorrelationForManyReferencesRefinementMode;
typedef struct lmrcImageAutoRotationCorrelationForManyReferencesInfo {
int nRot1; /* Image Number in Ref*/
int nRot1Step; /* Coarse Step in Fitting */
double nRot1AreaMin; /* Min: Rotation Area in Fitting */
double nRot1AreaMax; /* Max: Rotation Area in Fitting */
double nRot1AreaStep; /* Step: Rotation Area in Fitting */
double nRot1Delta; /* Delta: Rotation Interval of Ref */
double nRot1Start; /* Start: Rotation Interval of Ref */
int nRot2;
int nRot2Step;
double nRot2AreaMin;
double nRot2AreaMax;
double nRot2AreaStep;
double nRot2Delta;
double nRot2Start;
int nRot3;
int nRot3Step;
double nRot3AreaMin;
double nRot3AreaMax;
double nRot3AreaStep;
double nRot3Delta;
double nRot3Start;
int mode;
lmrcImageAutoRotationCorrelationForManyReferencesStackOrder StackOrder;
lmrcImageAutoRotationCorrelationForManyReferencesRefinementMode RefinementMode;
char* In;
FILE* fptOutASC; /* a file pointer for logging */
char* Out;
mrcImage out;
/* for Linear Correlation */
char* corFile;
mrcImage cor;
char* fitFile;
mrcImage fittedMap;
/* for Set mode correlation */
char* corFile2;
mrcImage cor2;
char* fitFile2;
mrcImage fittedMap2;
} lmrcImageAutoRotationCorrelationForManyReferencesInfo;
PVM
#ifdef PVM
typedef struct lmrcImageCorrelationPVMInfo {
int* tids;
int numTask;
} lmrcImageCorrelationPVMInfo;
#endif
API
extern void lmrcImageAutoRotationCorrelation(mrcImage* out, mrcImage* cor, mrcImage* in, mrcImage* ref, lmrcImageAutoRotationCorrelationInfo* linfo, int mode); extern void lmrcImageAutoRotationCorrelationRotationalCrossCorrelationFunction(mrcImage* out, mrcImage* cor, mrcImage* in, mrcImage* ref, lmrcImageAutoRotationCorrelationInfo* linfo, int mode); extern double lmrcImageLinearCorrelation(mrcImage* in1, mrcImage* in2, long mode); extern void lmrcImageCorrelation(mrcImage* cor, mrcImage* in, mrcImage* ref, long mode); extern double lmrcImageEuclidDistanceCalc(mrcImage* in1, mrcImage* in2, int mode); extern void lmrcImageCorrelationRefinement(mrcImage* cor, mrcImage* shift, mrcImage* in, mrcImage* ref, lmrcImageCorrelationRefinementInfo* info, long mode);
PVM
#ifdef PVM extern void lmrcImageCorrelationServerStart(lmrcImageCorrelationPVMInfo* linfo, FILE* fpt, int numTask); extern void lmrcImageCorrelationServerEnd(lmrcImageCorrelationPVMInfo linfo); extern void lmrcImageCorrelationPVMStart(mrcImage* in, mrcImage* ref, lmrcImageAutoRotationCorrelationInfo* linfo, int tid, long mode); extern void lmrcImageCorrelationPVMEnd(mrcImage* out, mrcImage* cor, lmrcImageAutoRotationCorrelationInfo* linfo, int tid, long mode); extern void lmrcImageCorrelationServer(); extern void lmrcImageAutoRotationCorrelationInfoSendByPVM(lmrcImageAutoRotationCorrelationInfo* linfo, int tid, long mode); extern void lmrcImageAutoRotationCorrelationInfoRecieveByPVM(lmrcImageAutoRotationCorrelationInfo* linfo, int tid, long mode); #endif
extern void lmrcImageAutoRotationCorretionForManyReferences(mrcImage* in, mrcImage* ref, lmrcImageAutoRotationCorrelationForManyReferencesInfo* info, lmrcImageAutoRotationCorrelationInfo* linfo, int mode);