Truncate my image intensity values in the range [-100 400]
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Emerson Nithiyaraj
el 10 de Sept. de 2019
Comentada: Emerson Nithiyaraj
el 10 de Sept. de 2019
Hello,
I have a medical raw CT 'NIFTI' image file of type double where the values of the image are in the range from -2000 to 2004. The values are the Hounsfield units (HU). The image looks like below.
![dd.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/237707/dd.jpeg)
Now as mentioned in a paper "No special pre-processing was performed except that we truncated the image intensity values of all scans to the range of [-200; 200] HU to ignore irrelevant image details". When i load this image file in an online NIFTI file viewer i could adjust the values and the same image looks like below.
![ssss.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/237708/ssss.jpeg)
But in matlab i want to truncate my image values between -100 and 400 to get a image as dislpayed above. How can i do that?
0 comentarios
Respuesta aceptada
Walter Roberson
el 10 de Sept. de 2019
TruncatedImage = max( min(YourImage, 400), -100 );
3 comentarios
Walter Roberson
el 10 de Sept. de 2019
How are you viewing it? Are you using imagesc()? Are you using imshow() with a second parameter of [] ?
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with Image Processing Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!