Public 型 | Public メソッド | Protected 型 | Protected 変数
クラス テンプレート mist::marray< Array >

画像のふちにマージンを持った配列 [詳細]

#include <mist.h>

Public 型

typedef Array::allocator_type allocator_type
 MISTコンテナが利用するアロケータ型
typedef Array::reference reference
 MISTのコンテナ内に格納するデータ型の参照.mist::array< data > の場合,data & となる
typedef Array::const_reference const_reference
 MISTのコンテナ内に格納するデータ型の const 参照.mist::array< data > の場合,const data & となる
typedef Array::value_type value_type
 MISTのコンテナ内に格納するデータ型.mist::array< data > の data と同じ
typedef Array::size_type size_type
 符号なしの整数を表す型.コンテナ内の要素数や,各要素を指定するときなどに利用し,内部的には size_t 型と同じ
typedef Array::difference_type difference_type
 符号付きの整数を表す型.コンテナ内の要素数や,各要素を指定するときなどに利用し,内部的には ptrdiff_t 型と同じ
typedef Array::pointer pointer
 MISTのコンテナ内に格納するデータ型のポインター型.mist::array< data > の場合,data * となる
typedef Array::const_pointer const_pointer
 MISTのコンテナ内に格納するデータ型の const ポインター型.mist::array< data > の場合,const data * となる
typedef Array::iterator iterator
 MISTのコンテナ内を操作する,STLで言う順方向のランダムアクセスイテレータ
typedef Array::const_iterator const_iterator
 MISTのコンテナ内を操作する,順方向のランダムアクセスイテレータのコンスト版
typedef Array::reverse_iterator reverse_iterator
 MISTのコンテナ内を操作する,逆方向のランダムアクセスイテレータ
typedef
Array::const_reverse_iterator 
const_reverse_iterator
 MISTのコンテナ内を操作する,逆方向のランダムアクセスイテレータのコンスト版

Public メソッド

bool resize (size_type num1)
 コンテナ内の要素数を変更する
bool resize (size_type num1, size_type num2)
 コンテナ内の要素数を変更する
bool resize (size_type num1, size_type num2, size_type num3)
 コンテナ内の要素数を変更する
bool swap (marray &a)
 コンテナ内の全ての内容を入れ替える.
void clear ()
 コンテナの要素を空にする
void fill_margin (const value_type &val=value_type())
 コンテナ内のマージン部分のデータ要素を指定された値で初期化する
size_type size1 () const
 X軸方向のコンテナに格納されているデータ数を返す
size_type size2 () const
 Y軸方向のコンテナに格納されているデータ数を返す
size_type size3 () const
 Z軸方向のコンテナに格納されているデータ数を返す
size_type width () const
 X軸方向のコンテナに格納されているデータ数を返す
size_type height () const
 Y軸方向のコンテナに格納されているデータ数を返す
size_type depth () const
 Z軸方向のコンテナに格納されているデータ数を返す
size_type margin1 () const
 X軸方向のマージン幅を返す
size_type margin2 () const
 Y軸方向のマージン幅を返す
size_type margin3 () const
 Z軸方向のマージン幅を返す
const marrayoperator= (const marray &o)
 同じ型の marray コンテナを代入する
template<class T , class Allocator >
const marrayoperator= (const array< T, Allocator > &o)
 要素の型が異なる array コンテナを代入する
template<class T , class Allocator >
const marrayoperator= (const array1< T, Allocator > &o)
 要素の型が異なる array1 コンテナを代入する
template<class T , class Allocator >
const marrayoperator= (const array2< T, Allocator > &o)
 要素の型が異なる array2 コンテナを代入する
template<class T , class Allocator >
const marrayoperator= (const array3< T, Allocator > &o)
 要素の型が異なる array3 コンテナを代入する
reference at (difference_type index)
 index で示される位置の要素の参照を返す
reference at (difference_type i, difference_type j)
 ( i, j ) で示される位置の要素の参照を返す
reference at (difference_type i, difference_type j, difference_type k)
 ( i, j, k ) で示される位置の要素の参照を返す
const_reference at (difference_type index) const
 index で示される位置の要素の const 参照を返す
const_reference at (difference_type i, difference_type j) const
 ( i, j ) で示される位置の要素の const 参照を返す
const_reference at (difference_type i, difference_type j, difference_type k) const
 ( i, j, k ) で示される位置の要素の const 参照を返す
reference operator[] (difference_type index)
 index で示される位置の要素の参照を返す
reference operator() (difference_type index)
 index で示される位置の要素の参照を返す
reference operator() (difference_type i, difference_type j)
 ( i, j ) で示される位置の要素の参照を返す
reference operator() (difference_type i, difference_type j, difference_type k)
 ( i, j, k ) で示される位置の要素の参照を返す
const_reference operator[] (difference_type index) const
 index で示される位置の要素の参照を返す
const_reference operator() (difference_type index) const
 index で示される位置の要素の const 参照を返す
const_reference operator() (difference_type i, difference_type j) const
 ( i, j ) で示される位置の要素の const 参照を返す
const_reference operator() (difference_type i, difference_type j, difference_type k) const
 ( i, j, k ) で示される位置の要素の const 参照を返す
 marray ()
 ディフォルトコンストラクタ.要素数 0,マージン 0 のコンテナを作成する
 marray (size_type margin)
 マージン margin のコンテナを作成する
 marray (const marray &o)
 コピーコンストラクタ
 marray (size_type w, size_type margin)
 マージン margin のコンテナを作成する
 marray (size_type w, size_type h, size_type margin)
 マージン margin のコンテナを作成する
 marray (size_type w, size_type h, size_type d, size_type margin)
 マージン margin のコンテナを作成する
template<class T , class Allocator >
 marray (const array< T, Allocator > &o, size_type margin1, const value_type &val=value_type(0))
 array 配列 o の配列の大きさと,X軸方向のマージン margin1 を用いて初期化し,全要素を val で初期化する
template<class T , class Allocator >
 marray (const array1< T, Allocator > &o, size_type margin1, const value_type &val=value_type())
 array1 配列 o の配列の大きさと,X軸方向のマージン margin1 を用いて初期化し,全要素を val で初期化する
template<class T , class Allocator >
 marray (const array2< T, Allocator > &o, size_type margin1, size_type margin2, const value_type &val=value_type())
 array2 配列 o の配列の大きさと,X軸方向のマージン margin1,Y軸方向のマージン margin2 を用いて初期化し,全要素を val で初期化する
template<class T , class Allocator >
 marray (const array2< T, Allocator > &o, size_type margin1, size_type margin2, size_type, const value_type &val)
 array2 配列 o の配列の大きさと,X軸方向のマージン margin1,Y軸方向のマージン margin2 を用いて初期化し,全要素を val で初期化する
template<class T , class Allocator >
 marray (const array3< T, Allocator > &o, size_type margin1, size_type margin2, size_type margin3, const value_type &val=value_type())
 array3 配列 o の配列の大きさと,X軸方向のマージン margin1,Y軸方向のマージン margin2,Z軸方向のマージン margin3 を用いて初期化し,全要素を val で初期化する
template<class T , class Allocator >
 marray (const array2< T, Allocator > &o, size_type margin1, const value_type &val=value_type())
 array2 配列 o の配列の大きさと,X・Y軸方向のマージン margin1 を用いて初期化し,全要素を val で初期化する
template<class T , class Allocator >
 marray (const array3< T, Allocator > &o, size_type margin1, const value_type &val=value_type())
 array3 配列 o の配列の大きさと,X・Y・Z軸方向のマージン margin1 を用いて初期化し,全要素を val で初期化する

Protected 型

typedef Array base
 基底クラス

Protected 変数

size_type margin1_
 X軸方向のマージン
size_type margin2_
 Y軸方向のマージン
size_type margin3_
 Z軸方向のマージン

説明

template<class Array>
class mist::marray< Array >

画像のふちにマージンを持った配列

1・2・3次元画像にマージンを持たせるための基本クラス (mist/mist.h をインクルードする)

引数
Array… 1・2・3次元画像クラスを指定する

関数

template<class Array>
reference mist::marray< Array >::at ( difference_type  index)
inline

index で示される位置の要素の参照を返す

引数
[in]index… コンテナ内の要素位置
戻り値
指定された要素を示す参照
template<class Array>
reference mist::marray< Array >::at ( difference_type  i,
difference_type  j 
)
inline

( i, j ) で示される位置の要素の参照を返す

引数
[in]i… コンテナ内のX軸方向の位置
[in]j… コンテナ内のY軸方向の位置
戻り値
指定された要素を示す参照
template<class Array>
reference mist::marray< Array >::at ( difference_type  i,
difference_type  j,
difference_type  k 
)
inline

( i, j, k ) で示される位置の要素の参照を返す

引数
[in]i… コンテナ内のX軸方向の位置
[in]j… コンテナ内のY軸方向の位置
[in]k… コンテナ内のY軸方向の位置
戻り値
指定された要素を示す参照
template<class Array>
const_reference mist::marray< Array >::at ( difference_type  index) const
inline

index で示される位置の要素の const 参照を返す

引数
[in]index… コンテナ内の要素位置
戻り値
指定された要素を示す const 参照
template<class Array>
const_reference mist::marray< Array >::at ( difference_type  i,
difference_type  j 
) const
inline

( i, j ) で示される位置の要素の const 参照を返す

引数
[in]i… コンテナ内のX軸方向の位置
[in]j… コンテナ内のY軸方向の位置
戻り値
指定された要素を示す const 参照
template<class Array>
const_reference mist::marray< Array >::at ( difference_type  i,
difference_type  j,
difference_type  k 
) const
inline

( i, j, k ) で示される位置の要素の const 参照を返す

引数
[in]i… コンテナ内のX軸方向の位置
[in]j… コンテナ内のY軸方向の位置
[in]k… コンテナ内のY軸方向の位置
戻り値
指定された要素を示す const 参照
template<class Array>
void mist::marray< Array >::clear ( )
inline

コンテナの要素を空にする

コンテナに格納されているデータを全て削除し,コンテナを空(要素数0)にする

template<class Array>
void mist::marray< Array >::fill_margin ( const value_type val = value_type( ))
inline

コンテナ内のマージン部分のデータ要素を指定された値で初期化する

マージン部分の要素を値 val で初期化する.

引数
[in]val… 要素を初期化する値

参照元 mist::closing(), mist::opening(), と mist::region_growing().

template<class Array>
reference mist::marray< Array >::operator() ( difference_type  index)
inline

index で示される位置の要素の参照を返す

引数
[in]index… コンテナ内の要素位置
戻り値
指定された要素を示す参照
template<class Array>
reference mist::marray< Array >::operator() ( difference_type  i,
difference_type  j 
)
inline

( i, j ) で示される位置の要素の参照を返す

引数
[in]i… コンテナ内のX軸方向の位置
[in]j… コンテナ内のY軸方向の位置
戻り値
指定された要素を示す参照
template<class Array>
reference mist::marray< Array >::operator() ( difference_type  i,
difference_type  j,
difference_type  k 
)
inline

( i, j, k ) で示される位置の要素の参照を返す

引数
[in]i… コンテナ内のX軸方向の位置
[in]j… コンテナ内のY軸方向の位置
[in]k… コンテナ内のY軸方向の位置
戻り値
指定された要素を示す参照
template<class Array>
const_reference mist::marray< Array >::operator() ( difference_type  index) const
inline

index で示される位置の要素の const 参照を返す

引数
[in]index… コンテナ内の要素位置
戻り値
指定された要素を示す const 参照
template<class Array>
const_reference mist::marray< Array >::operator() ( difference_type  i,
difference_type  j 
) const
inline

( i, j ) で示される位置の要素の const 参照を返す

引数
[in]i… コンテナ内のX軸方向の位置
[in]j… コンテナ内のY軸方向の位置
戻り値
指定された要素を示す const 参照
template<class Array>
const_reference mist::marray< Array >::operator() ( difference_type  i,
difference_type  j,
difference_type  k 
) const
inline

( i, j, k ) で示される位置の要素の const 参照を返す

引数
[in]i… コンテナ内のX軸方向の位置
[in]j… コンテナ内のY軸方向の位置
[in]k… コンテナ内のY軸方向の位置
戻り値
指定された要素を示す const 参照
template<class Array>
const marray& mist::marray< Array >::operator= ( const marray< Array > &  o)
inline

同じ型の marray コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の marray コンテナ
戻り値
自分自身
template<class Array>
template<class T , class Allocator >
const marray& mist::marray< Array >::operator= ( const array< T, Allocator > &  o)
inline

要素の型が異なる array コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の array コンテナ
戻り値
自分自身
template<class Array>
template<class T , class Allocator >
const marray& mist::marray< Array >::operator= ( const array1< T, Allocator > &  o)
inline

要素の型が異なる array1 コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の array1 コンテナ
戻り値
自分自身
template<class Array>
template<class T , class Allocator >
const marray& mist::marray< Array >::operator= ( const array2< T, Allocator > &  o)
inline

要素の型が異なる array2 コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の array2 コンテナ
戻り値
自分自身
template<class Array>
template<class T , class Allocator >
const marray& mist::marray< Array >::operator= ( const array3< T, Allocator > &  o)
inline

要素の型が異なる array3 コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の array3 コンテナ
戻り値
自分自身
template<class Array>
reference mist::marray< Array >::operator[] ( difference_type  index)
inline

index で示される位置の要素の参照を返す

引数
[in]index… コンテナ内の要素位置
戻り値
指定された要素を示す参照
template<class Array>
const_reference mist::marray< Array >::operator[] ( difference_type  index) const
inline

index で示される位置の要素の参照を返す

引数
[in]index… コンテナ内の要素位置
戻り値
指定された要素を示す参照
template<class Array>
bool mist::marray< Array >::resize ( size_type  num1)
inline

コンテナ内の要素数を変更する

要素数を num1 個に変更し,全ての要素をデフォルト値で初期化する.

引数
[in]num1… リサイズ後の全要素数
戻り値
true… 正常にリサイズが終了
false… リサイズ後のメモリを確保できなかった場合
template<class Array>
bool mist::marray< Array >::resize ( size_type  num1,
size_type  num2 
)
inline

コンテナ内の要素数を変更する

要素数を num1 × num2 個に変更し,要素数が変更された場合のみ全ての要素をデフォルト値で初期化する.

注意
必ず要素を初期化するためには,fill 関数を利用してください.
引数
[in]num1… リサイズ後のX軸方向の要素数
[in]num2… リサイズ後のY軸方向の要素数
戻り値
true… 正常にリサイズが終了
false… リサイズ後のメモリを確保できなかった場合
template<class Array>
bool mist::marray< Array >::resize ( size_type  num1,
size_type  num2,
size_type  num3 
)
inline

コンテナ内の要素数を変更する

要素数を num1 × num2 × num3 個に変更し,要素数が変更された場合のみ全ての要素をデフォルト値で初期化する.

注意
必ず要素を初期化するためには,fill 関数を利用してください.
引数
[in]num1… リサイズ後のX軸方向の要素数
[in]num2… リサイズ後のY軸方向の要素数
[in]num3… リサイズ後のZ軸方向の要素数
戻り値
true… 正常にリサイズが終了
false… リサイズ後のメモリを確保できなかった場合
template<class Array>
bool mist::marray< Array >::swap ( marray< Array > &  a)
inline

コンテナ内の全ての内容を入れ替える.

注意
どちらかのコンテナが外部メモリを利用している場合は,スワップは必ず失敗する

入れ替え元のコンテナ a の中身と全て入れ替える

引数
[in]a… 内容を入れ替える対象
戻り値
true… データのスワップに成功
false… データのスワップに失敗

このクラスの説明は次のファイルから生成されました:

Generated on Wed Nov 12 2014 19:44:29 for MIST by doxygen 1.8.1.2