how to convert a 3D volume DCM image to png format

4 ビュー (過去 30 日間)
Estefania Ruiz Muñoz
Estefania Ruiz Muñoz 2022 年 5 月 11 日
回答済み: VINAYAK LUHA 2023 年 9 月 21 日
How to convert a 3D volume DCM image to png format. That is, a medical image that contains several slices.
  2 件のコメント
Walter Roberson
Walter Roberson 2022 年 5 月 11 日
Do you want the slices to be individually converted? Do you want to do a volume rendering and save the rendered image? Do you want to do some kind of detection on the volume and draw the outside shell of an portion?
Estefania Ruiz Muñoz
Estefania Ruiz Muñoz 2022 年 5 月 11 日
@Walter Roberson I want the slices to be converted to png individually

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

回答 (1 件)

VINAYAK LUHA
VINAYAK LUHA 2023 年 9 月 21 日
Hi Estefania,
It is my understanding that you would like to know how to extract individual slices from a 3D volume DCM image as “.png” files.
Assuming that you have a 4-D volume from set of DICOM images which can be created from dicom images using the “dicomreadVolumefunction.
Here’s a possible workaround-
dicomVolume = dicomreadVolume('path to dicom folder');
numSlices = size(dicomVolume, 4)
for i=1:numSlices
slice = dicomVolume(:,:,i);
normalizedSlice = mat2gray(slice);
imwrite(normalizedSlice,"path to save folder"+"slice"+num2str(i)+".png");
end
Explore the following documentations for more details-
Regards,
Vinayak Luha

カテゴリ

Help Center および File ExchangeDICOM Format についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by