addContour
構文
説明
は、contourOut
= addContour(contourIn
,number
,name
,contourData
,geometry
)dicomContours
オブジェクト contourIn
の ROIs
プロパティに、ユーザー定義の関心領域 (ROI) シーケンスを追加します。関数 convertToInfo
を使用すると、DICOM メタデータの構造体セットと ROI 輪郭モジュールに新しい ROI データをエクスポートできます。
は、前の構文のすべての入力引数に加えて、入力 contourOut
= addContour(___,color
)dicomContours
オブジェクトに追加された輪郭データの色を指定します。
例
ROI データへの ROI シーケンスの追加
DICOM メタデータの構造体セットと ROI 輪郭モジュールから抽出した ROI データに対し、ROI シーケンスを追加します。
DICOM-RT 構造体セット ファイルから DICOM メタデータを読み取ります。
info = dicominfo("rtstruct.dcm");
DICOM メタデータの構造体セットと ROI 輪郭モジュールから、ROI データを抽出します。出力は、抽出した ROI データを格納する dicomContours
オブジェクトです。
contourIn = dicomContours(info);
dicomContours
オブジェクトの ROIs
プロパティを表示します。
contourIn.ROIs
ans=2×5 table
Number Name ContourData GeometricType Color
______ _________________ ___________ _____________ ____________
1 {'Body_Contour' } {90x1 cell} {90x1 cell} {3x1 double}
2 {'Tumor_Contour'} {21x1 cell} {21x1 cell} {3x1 double}
別の ROI 輪郭データのセットをワークスペースに読み込みます。この輪郭データには、ROI 内の輪郭の 3 次元座標が含まれています。
load("contours")
新しい ROI 輪郭データを含む ROI シーケンスを作成するには、ROI シーケンスの以下の属性を指定します。
ROI 番号
ROI のユーザー定義名
輪郭の幾何学的タイプ
ROI の色
ROI シーケンスに一意な番号を割り当てます。ROI 名は任意のユーザー定義名にすることができます。新しい ROI 輪郭データ内のすべての点は同一平面上にあり、最後の点は最初の点に接続されているので、幾何学的タイプを "Closed_planar"
として指定します。
number = 3; name = "Organ"; geometricType = "Closed_planar";
ROI の色を指定します。色を指定しない場合、ROIs
プロパティの色の既定値は []
に設定されます。
color = [0; 127; 127];
dicomContours
オブジェクトの ROIs
プロパティに、新しい ROI シーケンスを追加します。出力も dicomContours
オブジェクトであり、新しい ROI シーケンスと元のシーケンスが含まれます。
contourOut = addContour(contourIn,number,name,contours,geometricType,color)
contourOut = dicomContours with properties: ROIs: [3x5 table]
ROIs
プロパティを表示することで、新しい dicomContours
オブジェクトの詳細を表示します。関数convertToInfo
を使用して、変更済みの ROI データを DICOM メタデータとしてエクスポートできます。
contourOut.ROIs
ans=3×5 table
Number Name ContourData GeometricType Color
______ _________________ ___________ _____________ ____________
1 {'Body_Contour' } {90x1 cell} {90x1 cell} {3x1 double}
2 {'Tumor_Contour'} {21x1 cell} {21x1 cell} {3x1 double}
3 {'Organ' } {21x1 cell} {21x1 cell} {3x1 double}
入力引数
contourIn
— 入力 ROI データ
dicomContours
オブジェクト
入力 ROI データ。dicomContours
オブジェクトとして指定します。
number
— ROI 番号
整数スカラー
ROI 番号。整数スカラーとして指定します。ROI 番号は、ROI に対するユーザー定義の識別番号を参照します。
データ型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
name
— ROI のユーザー定義名
文字ベクトル | string スカラー
ROI のユーザー定義名。文字ベクトルまたは string スカラーとして指定します。
データ型: char
| string
contourData
— ROI 内の輪郭の 3 次元座標
N 行 3 列の行列の cell 配列
ROI 内の輪郭の 3 次元座標。N 行 3 列の行列の cell 配列として指定します。各行は、[x y z] 形式として、患者ベースの座標系で輪郭を定義します。
データ型: cell
geometry
— 輪郭の幾何学的タイプ
"Point"
| "Open_planar"
| "Open_nonplanar"
| "Closed_planar"
輪郭の幾何学的タイプ。以下のいずれかの値を指定します。
"Point"
"Open_Planar"
"Open_nonplanar"
"Closed_planar"
データ型: char
| string
color
— ROI の表示色
RGB 3 成分
ROI の表示色。色の赤、緑、青成分の強度を指定する RGB 3 成分として指定します。強度は [0, 255] の範囲でなければなりません。
データ型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
出力引数
contourOut
— 出力 ROI データ
dicomContours
オブジェクト
出力 ROI データ。dicomContours
オブジェクトとして返されます。出力オブジェクトの ROIs
プロパティには、入力 ROI とユーザー定義の ROI シーケンスが両方とも含まれます。
バージョン履歴
R2020a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)