createMask
dicomContours
オブジェクトからのボリューム マスクの作成
説明
は、ボリューム マスク BW
= createMask(rtContours
,roiIndex
,spatial
)BW
(指定された ROI roiIndex
のボクセル表現) を dicomContours
オブジェクト rtContours
から作成します。roiIndex
引数は、rtContours
内のどの輪郭を基にマスクを作成するかを指定します。spatial
は、3 次元データの位置、解像度、方向をワールド座標で指定します。
例
dicomContours
オブジェクトのマスクの作成
DICOM-RT 構造体セット ファイルのメタデータを読み取ります。
info = dicominfo("rtstruct.dcm");
メタデータから dicomContours
オブジェクトを構築します。
rtContours = dicomContours(info);
すべての ROI 情報をテーブルとして表示します。
rtContours.ROIs
ans=2×5 table
Number Name ContourData GeometricType Color
______ _________________ ___________ _____________ ____________
1 {'Body_Contour' } {90×1 cell} {90×1 cell} {3×1 double}
2 {'Tumor_Contour'} {21×1 cell} {21×1 cell} {3×1 double}
関数 plotContours
を使用して、すべての ROI の輪郭をプロットします。この関数はワールド座標の輪郭をプロットします。
plotContour(rtContours)
イメージが輪郭と同じスペースに収まるよう、plotContours
プロットと同じワールド座標範囲で imref3d
オブジェクトを作成します。
referenceInfo = imref3d([128 128 50],xlim,ylim,zlim);
rtContours
から、imref3d
オブジェクトによって指定された空間参照を使用して、最初の輪郭の 3 次元 logical マスク 'Body_Contour'
を作成します。
contourIndex = 1; rtMask = createMask(rtContours,contourIndex,referenceInfo);
マスクをボリューム イメージとして表示します。
volshow(rtMask);
入力引数
rtContours
— DICOM 輪郭
dicomContours
オブジェクト
DICOM 輪郭。dicomContours
オブジェクトとして指定します。
データ型: dicomContours
roiIndex
— DICOM 輪郭オブジェクト内の ROI
正の整数 | 文字ベクトル | string スカラー
DICOM 輪郭オブジェクト内の ROI。正の整数、文字ベクトル、または string スカラーとして指定します。この値は、dicomContours
オブジェクトの ROI テーブル内でどの ROI 識別子を使用するかによって変わります。
ROI 識別子 | 型 | 例 |
---|---|---|
Number | rtContours オブジェクトの ROI テーブル内の ROI の行。正の整数として指定します。Number は、ROI テーブルの最初の列です。 | rtMask = createMask(rtContours,1,spatialInfo) |
Name | rtContours オブジェクトの ROI テーブル内の ROI の名前。文字ベクトルまたは string スカラーとして指定します。Name は、ROI テーブルの 2 番目の列です。 | rtMask = createMask(rtContours,"Body_Contour",spatialInfo) |
データ型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| char
| string
spatial
— 空間参照情報
構造体 | imref3d
オブジェクト
空間参照情報。構造体または imref3d
オブジェクトとして指定します。dicomreadVolume
によって返される構造体で、フィールドとして PatientPosition
、PixelSpacing
、PatientOrientation
を含むものを使用できます。空間参照情報は、3 次元座標データの位置、解像度、および方向を提供します。
出力引数
バージョン履歴
R2020b で導入
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)