how to convert dicom image to jpg
28 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Usama Javed
el 26 de Abr. de 2012
Comentada: junyong hong
el 12 de Mzo. de 2020
how can i convert dicom images to jpg format?? i have a list of dicom images and i want to convert these images to jpg
0 comentarios
Respuesta aceptada
Thomas
el 26 de Abr. de 2012
You could use a software like power-dicom
http://www.dicom-solutions.com/powerdicom.shtm around $200
or use a free software like dicom2 to convert to bmp, png or raw
http://www.barre.nom.fr/medical/dicom2/ and then to jpg or just use the bmp/png in matlab directly..
0 comentarios
Más respuestas (1)
Joy King
el 27 de Jul. de 2012
Editada: Walter Roberson
el 21 de Dic. de 2012
clc;
close all;
clear all;
% Open an image.
[filename,pathname]=uigetfile('*','open');
% whether you open an image.
if isequal(filename,0)
disp('User selected Cancel.')
else
disp(['User selected ', fullfile(pathname, filename), '.'])
end
full_file = fullfile(pathname,filename);
Dic_data = dicomread(full_file);
figure; imshow(Dic_data, 'DisplayRange', []);
% the name for your image after convertion.
if isempty(strfind(full_file, '.dic'))
new_name = strcat(full_file, '.jpg');
else
[pathname, name, ext] = fileparts(full_file);
name = strcat(name, '.jpg');
new_name = fullfile(pathname, name);
end
% save the image as .jpg format.
if isa(Dic_data, 'int16')
imwrite(Dic_data,new_name,'jpg','Bitdepth',16,'Mode','lossless');
elseif isa(Dic_data, 'uint8')
imwrite(Dic_data,new_name,'jpg','Mode','lossless');
end
2 comentarios
Ver también
Categorías
Más información sobre DICOM Format en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!