- https://www.mathworks.com/help/matlab/ref/scatter3.html
- https://www.mathworks.com/help/matlab/ref/datacursormode.html
How to put voxel intensity value in the plotting
조회 수: 1 (최근 30일)
이전 댓글 표시
My question is that here we can see the three different co-ordinates but I want to show the voxel intensity value also with this . Can any one suggest me how to do it ?
댓글 수: 0
답변 (1개)
Chetan
2023년 11월 16일
I understand you're looking to plot 3D data and display voxel intensity in the tooltip.
You can achieve this with MATLAB's `datacursormode` function. Here's a brief example:
% Sample data
x = rand(100,1);
y = rand(100,1);
z = rand(100,1);
v = rand(100,1)*100; % Voxel intensity
% 3D scatter plot
scatter3(x, y, z, 'filled');
% Customize tooltip to include voxel intensity
h = datacursormode;
h.UpdateFcn = @(~,eventObj) {['X: ',num2str(eventObj.Position(1))], ...
['Y: ',num2str(eventObj.Position(2))], ...
['Z: ',num2str(eventObj.Position(3))], ...
['Voxel Intensity: ',num2str(v(eventObj.DataIndex))]};
For further details, refer to the following MathWorks documentation:
Hope it helps !
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Feature Detection and Extraction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!