メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

imhandles

R2026a

すべての Image オブジェクトを取得

説明

himage = imhandles(hparent) は、先祖が hparent である image オブジェクトをすべて返します。imhandles は、image オブジェクトの Figure がそれらの親と同じでない場合、エラーを返します。imhandles はカラー バーを無視します。

例

例

すべて折りたたむ

イメージを表示します。

imshow('kobi.png')

Figure contains an axes object. The hidden axes object contains an object of type image.

現在の座標軸の image オブジェクトを返します。

imageobj = imhandles(gca)
imageobj = 
  Image with properties:

           CData: [1224×1632×3 uint8]
    CDataMapping: 'direct'

  Show all properties

同じ Figure に 2 つのイメージを表示し、imhandles を使用して、Figure の両方の image オブジェクトを取得します。

figure
subplot(1,2,1)
imshow('kobi.png')
subplot(1,2,2)
imshow('sherlock.jpg')

Figure contains 2 axes objects. Hidden axes object 1 contains an object of type image. Hidden axes object 2 contains an object of type image.

imageobjs = imhandles(gcf)
imageobjs = 
  2×1 Image array:

  Image
  Image

imageobjs 配列の最初のイメージを検査します。

imageobjs(1)
ans = 
  Image with properties:

           CData: [640×960×3 uint8]
    CDataMapping: 'direct'

  Show all properties

入力引数

すべて折りたたむ

親のグラフィックス オブジェクト。figure、axes、uipanel、または image グラフィックス オブジェクトのハンドルとして指定します。

出力引数

すべて折りたたむ

先祖が hparent である image オブジェクト。イメージまたはイメージの配列として返されます。

バージョン履歴

R2006a より前に導入

参考

|