필터 지우기
필터 지우기

How to change the column pixel values of a DICOM image and assign new values columnwise)?

조회 수: 2 (최근 30일)
I want to change the column-wise values of a DICOM image and assign them with new values to generate a new image. Columns (384) will be divided into 1-130, 131-230, 231-330, 331-384 and I want to multiply each (for example, all columns from 1-130 will be multiplied by * 0.15, to get a new value of the pixel). Please anyone may like to help. thanks

채택된 답변

Walter Roberson
Walter Roberson 2023년 11월 2일
multfactor = repelem([0.15, 0.18, 0.04, 0.23], [130 100 100 54]); %modify factors appropriately
newimage = oldimage .* multfactor;
If you need to write out the new image in the form of a dicom file, it can get a bit messy to get all of the details right. But use dicominfo() to get the information about the DICOM file, and pass the info in the dicomwrite() call.
  댓글 수: 5
Walter Roberson
Walter Roberson 2023년 11월 2일
newimage = cast( double(im1T2) .* multfactor, 'like', Im1T2) ;
But how did multfactor get to be 770 long? The code I posted creates 384 long.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Support에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by