Hack the createMask function

조회 수: 6 (최근 30일)
Xinyi Li
Xinyi Li 2021년 8월 19일
댓글: Xinyi Li 2021년 8월 20일
I had been working on Dicom files and recently switched to txt files exported by inhouse functions. I was trying to use the createMask function to convert structure contours into binary masks. However, I don't use Dicom files any more. So I wrote the same information as in the dicomcontours object into a structure and fed it to the createMask function. Then I realized that createMask does not accept data types other than dicomcontours as the first input. Is there a way to convert the structure into a dicomcontours class or hack into the createMask function to force it to allow my input? Any comments are appreciated!
  댓글 수: 2
Walter Roberson
Walter Roberson 2021년 8월 19일
Not sure what kind of information is available in your structure...
Xinyi Li
Xinyi Li 2021년 8월 20일
@Walter Roberson Thanks for the info! The function createMask is preferred is because it requires minimum amount of changes in my previous code that works with Dicom files. I have converted my txt files into a similar form as in dicomcontours. Now what I'm doing is saving an empty dicomcontours object and add new contours into it. Not sure if this will cause problems later.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Read and Write Image Data from Files에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by