Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 2 de Nov. de 2023
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 comentarios
Walter Roberson
Walter Roberson el 2 de Nov. de 2023
newimage = cast( double(im1T2) .* multfactor, 'like', Im1T2) ;
But how did multfactor get to be 770 long? The code I posted creates 384 long.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Language Support en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by