「lmrcImageCentre(API)」の版間の差分

提供: Eospedia
移動: 案内検索
(ページの作成:「DataManip/mrcImage/src/'''lmrcImageCentre'''はmrcImageCenterOfMassCalculateのためのAPI です。 == 定数 == == 構造体 == typedef struct lmrcImageCenterOf...」)
 
 
行1: 行1:
DataManip/mrcImage/src/'''lmrcImageCentre'''[[mrcImageCenterOfMassCalculate]]のためのAPI です。
+
DataManip/mrcImage/src/'''lmrcImageCentre'''は画像の重心を算出するためのAPI です。[[mrcImageCenterOfMassCalculate]]などで使用されています。
  
 
== 定数 ==
 
== 定数 ==
  
 
== 構造体 ==
 
== 構造体 ==
 +
このAPIで使用する設定データ
 
  typedef struct lmrcImageCenterOfMass {
 
  typedef struct lmrcImageCenterOfMass {
 
   float x;
 
   float x;
行11: 行12:
  
 
== API ==
 
== API ==
 +
===重心の算出===
 +
画像から重心を算出し、centerOfMassへ座標を格納します。
 
  extern void lmrcImageCenterOfMassCalculate(lmrcImageCenterOfMass *centerOfMass,mrcImage in1);
 
  extern void lmrcImageCenterOfMassCalculate(lmrcImageCenterOfMass *centerOfMass,mrcImage in1);
 +
 +
===重心へ移動===
 +
画像の原点が重心になるように移動します。
 
  extern void lmrcImageShiftCenterOfMassIntoImageCenter(mrcImage* out, mrcImage* in, mrcPixelDataHowToGet mode);
 
  extern void lmrcImageShiftCenterOfMassIntoImageCenter(mrcImage* out, mrcImage* in, mrcPixelDataHowToGet mode);

2014年5月21日 (水) 08:30時点における最新版

DataManip/mrcImage/src/lmrcImageCentreは画像の重心を算出するためのAPI です。mrcImageCenterOfMassCalculateなどで使用されています。

定数

構造体

このAPIで使用する設定データ

typedef struct lmrcImageCenterOfMass {
  float x;
  float y;
  float z;
} lmrcImageCenterOfMass;

API

重心の算出

画像から重心を算出し、centerOfMassへ座標を格納します。

extern void lmrcImageCenterOfMassCalculate(lmrcImageCenterOfMass *centerOfMass,mrcImage in1);

重心へ移動

画像の原点が重心になるように移動します。

extern void lmrcImageShiftCenterOfMassIntoImageCenter(mrcImage* out, mrcImage* in, mrcPixelDataHowToGet mode);