Scaling of intensity value of captured jpg image

2 views (last 30 days)
I have a captured CT image (.jpg) of segittal plane. I want to scale it (.jpg) corresponding to .dcm image (512x512 uint16). The intensity range of .dcm image is from [0 to 3070]. Or is there any other way to convert it into dicom format with same intensity range?
Thanks for help...

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 23 Sep 2019
Edited: KALYAN ACHARJYA on 24 Sep 2019
Is this?
input_image=imread('filename.jpg');
dicomwrite(input_image,'dicom_img_name.dcm');
Or
You want to map the RGB pixel values [0-255] ranges to [0 to 3070].
Good Luck!
  4 Comments
kritika joshi
kritika joshi on 24 Sep 2019
Thanks for your efforts. I had tried this and getting a round off range of (0 to 2966).
KALYAN ACHARJYA
KALYAN ACHARJYA on 24 Sep 2019
It's my pleasure, happy to know that, the problem has been solved

Sign in to comment.

More Answers (1)

darova
darova on 23 Sep 2019
I'm not familiar with DICOM images but looks simple:
I1 = imread('3.jpg');
I2 = rgb2gray(I1);
I3 = I2-min(I2); % make min value 0
I3 = I3*3070/max(I3(:)); % make max value 3070
dicomwrite(I2,'test_scaled_3070.dcm')
imshow(I2)
  1 Comment
kritika joshi
kritika joshi on 24 Sep 2019
Thanks for your answer. I have tried this, but I3 = I3*3070/max(I3(:)); is giving a binary matrix.

Sign in to comment.

Categories

Find more on DICOM Format in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!