I need to delete a few lines from some DICOM files. I can open up the file after I use dicominfo and find the line that I want gone and simply hit delete (or right click delete) and use dicomwrite to save the file. This works fine, but I would like to automate this process. Is there a way to code in to delete a line from a dicom file? For example:
aa = dicominfo('RS.dcm');
%I just want to delete:
aa.RTROIObservationsSequence.Item_3.Private_3773_3005
Sorry if this seems trival, I am relativly inexperienced with Matlab and can't seem to find any information relating to this.

 채택된 답변

Tim
Tim 2014년 4월 4일

0 개 추천

I figured it out. Just needed to use rmfield to remove the line:
aa = dicominfo('RS.dcm');
aa.RTROIObservationsSequence.Item_3 = rmfield(aa.RTROIObservationsSequence.Item_3,'Private_3773_3005');
Pretty simple

추가 답변 (1개)

Walter Roberson
Walter Roberson 2014년 4월 4일

0 개 추천

DICOM files do not have "lines": they are often binary files that can contain blobs of binary data.
You should be able to use dicomread(), alter the values, and dicomwrite()

댓글 수: 1

Tim
Tim 2014년 4월 4일
I understand how to alter values, I'm asking if there is a way to delete the value.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 DICOM Format에 대해 자세히 알아보기

질문:

Tim
2014년 4월 4일

답변:

Tim
2014년 4월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by