Program on digital processing of thoracic x-ray images
1 view (last 30 days)
Show older comments
I have to make a code that allows me to calculate the RCT, this is the quocient between the width of the heart and the width of the lungs. I am provided with a briefcase that has several images of separate hearts and lungs. These images are identified with the patient ID and structure (heart ou lungs). I also already have a function that allows me to calculate the width and the position of heart or lungs, depends on the image chosen. However, there are patients who only have one of the tests, for exemple, only lungs or only hearts. I think I have to creat an "if" cycle, so that if the patient only has one of the tests, issue an error message, if the patient has both exams calculate the width for each image and then the quotient between them. But I do not know how to do it. If you can help me, I'd appreciate it. Thank you very much.
P.S: I can not use the native Matlab functions
0 Comments
Answers (1)
Image Analyst
on 23 Jan 2022
If you cannot use MATLAB, then I'm afraid we cannot help. This is a forum for helping people with their MATLAB programming.
% Call your custom-written functions depending on what kind of tests
% this particular patient had performed.
if patientHadHeartTestPerformed % For example, get this flag from your table or database.
heartResults = ProcessImageForHeart(yourImage);
end
if patientHadLungTestPerformed
lungResults = ProcessImageForLungs(yourImage);
end
5 Comments
Image Analyst
on 25 Jan 2022
OK, I think my original answer stands:
% Call your custom-written functions depending on what kind of tests
% this particular patient had performed.
if patientHadHeartTestPerformed % For example, get this flag from your table or database.
heartResults = ProcessImageForHeart(yourImage);
end
if patientHadLungTestPerformed
lungResults = ProcessImageForLungs(yourImage);
end
You said "I also already have a function that allows me to calculate the width and the position of heart or lungs" so you would just use that function in place of my "ProcessImageForHeart" or "ProcessImageForLungs" function. Just make sure your function doesn't use any of the banned functions. You should ask your professor to review your code just to make sure.
See Also
Categories
Find more on View and Analyze Simulation Results 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!