How can I create an isodose band from the imaged provided?

16 visualizzazioni (ultimi 30 giorni)
How can I create an isodose band from the imaged provided? the three dost image was the one i was provided. how can i get the other imaged that has a band.

Risposte (1)

Pramil
Pramil il 29 Apr 2024
Hi Naomi,
Assuming plotting an isodose curve means drawing contours at specific intensity levels. Here's how you can do it using MATLAB:
  • Load and convert the image to double for better precision since we are working with intensity values.
  • Define what intensity values you're interested in for plotting the isodose curves. Since the image provided has white circular regions, you might be interested in higher intensity values. Pixel values in an 8-bit grayscale image range from 0 (black) to 255 (white).
  • Use the contour function to plot the isodose curves. You'll need to generate a grid of X, Y coordinates that match the dimensions of your image. To know more about the “contour” function you can refer the followig link: https://www.mathworks.com/help/matlab/ref/contour.html
This will generate a plot with contours drawn at the specified intensity levels (isodose curves), effectively showing the boundaries of the circular regions if the levels are chosen correctly.
Here is an example code that works in MATLAB R2023b for the above:
img = imread('Image.png');
if size(img, 3) == 3
img = rgb2gray(img);
end
imgDouble = double(img);
% Assuming you're interested in high intensity but not exactly white
% to capture the boundary of the circular regions
isodoseLevels = linspace(200, 250, 3); % Example levels, adjust as needed
[X, Y] = meshgrid(1:size(imgDouble,2), 1:size(imgDouble,1));
figure;
contour(X, Y, imgDouble, isodoseLevels, 'LineWidth', 2);
colormap(jet); % Use a colorful colormap to distinguish levels
colorbar;
title('Isodose Curves for the Image');
xlabel('X-axis');
ylabel('Y-axis');
axis equal tight; % Adjust axis scaling and limits
Hope it helps.

Categorie

Scopri di più su Images in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by