フィルターのクリア

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.
Rahman Ud Din
Rahman Ud Din 2023 年 11 月 3 日
Thank you for your help. It worked.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLanguage Support についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by