「lmrcImageROI2D(API)」の版間の差分
提供: Eospedia
(ページの作成:「DataManip/mrcImage/src/'''lmrcImageROI2D'''はROIファイル(2D)切り出しのためのAPI です。主にmrcImageROI、mrcImageROIsで使用していますが...」) |
|||
行1: | 行1: | ||
− | DataManip/mrcImage/src/'''lmrcImageROI2D'''はROIファイル(2D)切り出しのためのAPI です。主に[[mrcImageROI]]、[[mrcImageROIs]]で使用していますが、[[mrcImageAutoRotationCorrelation]] | + | DataManip/mrcImage/src/'''lmrcImageROI2D'''はROIファイル(2D)切り出しのためのAPI です。主に[[mrcImageROI]]、[[mrcImageROIs]]で使用していますが、[[mrcImageAutoRotationCorrelation]]など計算で一部の画像データが必要な際にも使用します。 |
== 定数 == | == 定数 == | ||
− | + | lmrcImageSingleROIInfoのメンバーShapeの値として使用します。 | |
− | + | ||
typedef enum lmrcImageROIShape { | typedef enum lmrcImageROIShape { | ||
− | + | Rect =0, | |
− | + | Rect2 =1, | |
− | + | Circle =2, | |
Line =3 | Line =3 | ||
} lmrcImageROIShape; | } lmrcImageROIShape; | ||
+ | == 構造体 == | ||
+ | lmrcImageSingleROIの設定データです。lmrcImageROIsInformationGetを使用すると、ファイルからROI情報を読み込んで格納することができます。 | ||
+ | typedef struct lmrcImageROIsInfo { | ||
+ | lmrcImageSingleROIInfo* ROI; | ||
+ | int numROI; | ||
+ | } lmrcImageROIsInfo; | ||
+ | |||
+ | 設定データの各ROI情報です。 | ||
typedef struct lmrcImageSingleROIInfo { | typedef struct lmrcImageSingleROIInfo { | ||
− | + | char* FileName; | |
− | + | lmrcImageROIShape Shape; | |
− | + | float centerx; /* For All Shape */ | |
− | + | float centery; | |
− | + | float blx; /* For Rect, Rect2, Circle */ | |
− | + | float bly; | |
− | + | float brx; | |
− | + | float bry; | |
− | + | float trx; | |
− | + | float try; | |
− | + | float tlx; | |
− | + | float tly; | |
float startx; /* For Line */ | float startx; /* For Line */ | ||
float starty; | float starty; | ||
行30: | 行37: | ||
/* For Post Modification */ | /* For Post Modification */ | ||
− | + | int flagWidth; /* For Rect, Rect2, Circle, Line */ | |
− | + | float width; | |
− | + | int flagHeight; /* For Rect, Rect2, Circle */ | |
− | + | float height; | |
− | + | float radius; | |
− | + | int mode; | |
int flagRotation; | int flagRotation; | ||
行54: | 行61: | ||
float dY; | float dY; | ||
} lmrcImageSingleROIInfo; | } lmrcImageSingleROIInfo; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== API == | == API == | ||
+ | ===ROI情報の読み込み=== | ||
+ | ファイルから設定データを読み込んで、ROI情報(linfo)へ格納します。 | ||
extern void lmrcImageROIsInformationGet(FILE* fpt, lmrcImageROIsInfo* linfo); | extern void lmrcImageROIsInformationGet(FILE* fpt, lmrcImageROIsInfo* linfo); | ||
+ | |||
+ | ===ROIファイル=== | ||
+ | 入力ファイル(in)からROI情報(linfo)を元にROIファイル切り出しを行います。 | ||
extern void lmrcImageSingleROI(mrcImage* out, mrcImage* in, lmrcImageSingleROIInfo* linfo, int mode); | extern void lmrcImageSingleROI(mrcImage* out, mrcImage* in, lmrcImageSingleROIInfo* linfo, int mode); |
2014年5月19日 (月) 01:25時点における最新版
DataManip/mrcImage/src/lmrcImageROI2DはROIファイル(2D)切り出しのためのAPI です。主にmrcImageROI、mrcImageROIsで使用していますが、mrcImageAutoRotationCorrelationなど計算で一部の画像データが必要な際にも使用します。
定数
lmrcImageSingleROIInfoのメンバーShapeの値として使用します。
typedef enum lmrcImageROIShape { Rect =0, Rect2 =1, Circle =2, Line =3 } lmrcImageROIShape;
構造体
lmrcImageSingleROIの設定データです。lmrcImageROIsInformationGetを使用すると、ファイルからROI情報を読み込んで格納することができます。
typedef struct lmrcImageROIsInfo { lmrcImageSingleROIInfo* ROI; int numROI; } lmrcImageROIsInfo;
設定データの各ROI情報です。
typedef struct lmrcImageSingleROIInfo { char* FileName; lmrcImageROIShape Shape; float centerx; /* For All Shape */ float centery; float blx; /* For Rect, Rect2, Circle */ float bly; float brx; float bry; float trx; float try; float tlx; float tly; float startx; /* For Line */ float starty; float endx; float endy; /* For Post Modification */ int flagWidth; /* For Rect, Rect2, Circle, Line */ float width; int flagHeight; /* For Rect, Rect2, Circle */ float height; float radius; int mode; int flagRotation; float angle; int flagMagnifiedWidth; float magnifiedWidth; int flagMagnifiedHeight; float magnifiedHeight; int flagNonPeriodic; /* For Layer Line Information */ int flagLayerLine; float truePitch; float Ly; float dY; } lmrcImageSingleROIInfo;
API
ROI情報の読み込み
ファイルから設定データを読み込んで、ROI情報(linfo)へ格納します。
extern void lmrcImageROIsInformationGet(FILE* fpt, lmrcImageROIsInfo* linfo);
ROIファイル
入力ファイル(in)からROI情報(linfo)を元にROIファイル切り出しを行います。
extern void lmrcImageSingleROI(mrcImage* out, mrcImage* in, lmrcImageSingleROIInfo* linfo, int mode);