Public メソッド |
| marching_cubes () |
| コンストラクタ
|
| ~marching_cubes () |
| デストラクタ
|
bool | is_preprocessed () const |
| 前処理されたデータの有無を返す
|
void | threshold (float_type th) |
| しきい値パラメータを設定
|
float_type | threshold () const |
| しきい値パラメータを取得設定
|
void | offset (float_type ox, float_type oy, float_type oz) |
| オフセットパラメータを設定
|
vector_type | offset () const |
| オフセットパラメータを取得設定
|
void | scale (float_type sx, float_type sy, float_type sz) |
| スケールパラメータを設定
|
vector_type | scale () const |
| スケールパラメータを取得設定
|
void | isosurfacing (const image_type &va, vector_list_type &pv, vector_list_type &nv, std::vector< size_type > &sv) |
| 等値面生成(前処理の有無で等値面生成処理を分ける)
|
template<class T > |
void | isosurfacing (const image_type &va, facet_list< T > &facets) |
| 等値面生成(前処理の有無で等値面生成処理を分ける)
|
void | isosurfacing_with_preprocess (const image_type &va, vector_list_type &pv, vector_list_type &nv, std::vector< size_type > &sv) |
| 等値面生成(前処理有り)
|
void | isosurfacing_without_preprocess (const image_type &va, vector_list_type &pv, vector_list_type &nv, std::vector< size_type > &sv) |
| 等値面生成(前処理無し)
|
template<class T > |
void | isosurfacing_with_preprocess (const image_type &va, facet_list< T > &facets) |
| 等値面生成(前処理有り)
|
template<class T > |
void | isosurfacing_without_preprocess (const image_type &va, facet_list< T > &facets) |
| 等値面生成(前処理無し)
|
bool | preprocess (const image_type &va) |
| 前処理(Interval-tree の構築や各格子点の法線ベクトルの計算など)
|
void | de_preprocess () |
| 前処理で構築されたデータを破棄
|
template<typename ARRAY3, typename P = double>
class mist::marching_cubes< ARRAY3, P >
ボリュームデータから等値面を生成するためのクラス
区間の集合から2分木を構築し、通常O(n)かかる探索時間をO(log_2(n))に削減する. 線分や面分の重なり判定などに有効.
- 注意
- mist::arra3< 算術型 > 型を入力とする.
-
ポリゴンの各頂点座標( mist::vector3< 算術型 >型 ),各頂点の法線ベクトル( mist::vector3< 算術型 > 型 ),各ポリゴンの頂点数( size_t 型 )の3つのstd::vectorを等値面生成結果の出力とする.
-
ポリゴンの各頂点座標と各頂点の法線ベクトルは OpenGL の頂点配列として利用可能( GL_POLYGON や GL_TRIANGLE_FAN 等に使える).
- 引数
-
ARRAY3 | … ボリュームデータの型 |
P | … 等値面ポリゴンの頂点座標の要素の型 |
使用例
std::vector< mist::vector3< double > > pv;
std::vector< mist::vector3< double > > nv;
std::vector< size_t > sv;
mcs.
scale( 1.0, 1.0, 1.0 );