Matlab Code to remove sensitive items in a dicom data
geshi={'*.dcm','Dicom image (*.dcm)';... '*.bmp','Bitmap image (*.bmp)';... '*.jpg','JPEG image (*.jpg)';... '*.*','All Files (*.*)'}; [FileName FilePath]=uigetfile(geshi,'Load files','*.dcm','MultiSelect','on'); if ~isequal([FileName,FilePath],[0,0]); FileFullName=strcat(FilePath,FileName); if ~ischar(FileFullName) FileFullName=FileFullName([2:end 1])'; end else return; end n=length(FileFullName); foldername='dicom10'; mkdir(foldername); for i=1:n X=dicomread(FileFullName{i}); metadata=dicominfo(FileFullName{i}); metadata.PatientName.FamilyName='XXX'; metadata.InstitutionName='XXX'; metadata.InstitutionalDepartmentName='XXX'; dicomwrite(X, [foldername '/' FileName{i}], metadata, 'CreateMode', 'copy'); end