フィルターのクリア

How to plot a point in 3D data displayed in volume Viewer?

16 ビュー (過去 30 日間)
M W
M W 2020 年 1 月 27 日
コメント済み: Rik 2023 年 4 月 25 日
I have a 3D medical image.
I want to mark a certain point in that image and display the 3D image with volumeViewer.
The point has x,y,z coordinates.
How can I plot this point into the 3D image and display both in volume Viewer?
  4 件のコメント
Dunja Gorup
Dunja Gorup 2023 年 4 月 24 日
XYZCoordinates_Array was positive integers array (:,:,:).
I(XYZ)=true; %does not preform as expected for e.g. XYZ=[10,13,9;12,11,8;1,2,3;3,4,5;1,7,5];
I(XYZ(1,:))=true % does not produce the same result as I(10,13,9)=true;
The solution was achieves by sub2index as below.
Rik
Rik 2023 年 4 月 25 日
The reason why this is the case, is that the indexing does not produce a comma separated list. You can produce such a list with a struct array and with a cell array:
XYZ=[10,13,9;12,11,8;1,2,3;3,4,5;1,7,5];
XYZ(1,:) % normal array
ans = 1×3
10 13 9
tmp = num2cell(XYZ);
tmp{1,:} % comma separated list
ans = 10
ans = 13
ans = 9

サインインしてコメントする。

採用された回答

Selva Karna
Selva Karna 2020 年 1 月 28 日
To view 3d Volume:
clc
clear all;
close all;
your volume=V;
volshow(V)
3Point view:
% Make mask 3d based on your 3d points
len=length(your 3d points);
% Create Mask
3d_mask=zeros(your_3d points(size));
3d_mask(:,:,:)=your_3d_mask_holes;
volshow(3d_mask)
  4 件のコメント
Dunja Gorup
Dunja Gorup 2023 年 4 月 24 日
Following solution worked by subindexing:
AL=zeros(50,50,50);
XYZ=[10,13,9;12,11,8;1,2,3;3,4,5;1,7,5];
ind = sub2ind(size(AL), XYZ(:,1), XYZ(:,2), XYZ(:,3));
AL(ind) = true;
volshow(AL);
Dunja Gorup
Dunja Gorup 2023 年 4 月 25 日
However, this mask is sometimes offset to the original image from which the voxel values were derived. Probably due to some transformation?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange3-D Volumetric Image Processing についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by