![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1436968/image.png)
what format I should save my volumetric data to upload it in 'Volume Viewer' app?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
2NOR_Kh
il 18 Lug 2023
Risposto: Mrutyunjaya Hiremath
il 18 Lug 2023
I have an ultrasound video clip and I want to plot it as a 3D rendered. I want to use 'Volume Viewer' app but when I upload either of the video clip, the single frames, or the voulumetric data, it gives a format error.
I attached the videoFile here, then I applied this code to generate the volumetric data.
videoFile = "address.mp4";
videoReader = VideoReader(videoFile);
numFrames = videoReader.NumFrames;
frameSize = [videoReader.Height, videoReader.Width]; % Dimensions of each frame
volumetricData = zeros([frameSize, numFrames]); % Initialize the 3D matrix
for i = 1:numFrames
frame = read(videoReader, i); % Read the i-th frame
% Preprocess the frame (if needed)
% Register the frame (if needed)
volumetricData(:,:,i) = rgb2gray(frame); % Convert the frame to grayscale and store in the 3D matrix
end
% Step 5: Visualization and rendering
% Display the 3D rendering using volume rendering
figure;
h = volshow(volumetricData); % Display the volume rendering
title('Full Volume Rendering');
I appreciate any help.
Risposta accettata
Mrutyunjaya Hiremath
il 18 Lug 2023
Hi
save it in .mat format and use "Import From Workspace" or "Import From File" in "Import Volume" tab.
save volumetricData volumetricData;
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 3-D Volumetric Image Processing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!