Hi all
i want try open multiple images using implay. but want to change contrast first. Below is my code, but still error. anyone can help me.
P = zeros(512, 512, 313);
for K = 1 : 313
petname = sprintf('TRANSA001_CT%03d.dcm', K);
P(:,:,K) = dicomread(petname);
end
Out(:,:,K) = imadjust(P(:,:,K));
implay(Out, [-182 292]);

9 commentaires

KSSV
KSSV le 14 Mar 2018
What error you facing? Show us the error and error line.
mohd akmal masud
mohd akmal masud le 14 Mar 2018
Operands to the and && operators must be convertible to logical scalar values.
Error in uiscopes.ScopeCLI/checkSource (line 92) if ~isnumeric(fps) isnan(fps) isinf(fps) ~isreal(fps)
Error in matlabshared.scopes.UnifiedScope (line 105) checkSource( hScopeCfg.ScopeCLI );
Error in uiscopes/new (line 22) hScope = matlabshared.scopes.UnifiedScope(hScopeCfg, varargin{:});
Error in implay (line 60) obj = uiscopes.new(hScopeCfg);
Error in JDT (line 7) implay(Out, [-182 292]);
KSSV
KSSV le 14 Mar 2018
problem is at implay..I think imadjust is working fine.
mohd akmal masud
mohd akmal masud le 14 Mar 2018
i know. do you have idea?
What is class and size of out ?
simply try:
implay(Out)
mohd akmal masud
mohd akmal masud le 14 Mar 2018
what is out
Name Size Bytes Class Attributes
C2 512x512 524288 int16
if true
% code
end
implay(Out, [-182 292]);
What is Out class?
Name Size Bytes Class Attributes
Out 512x512 524288 int16

Connectez-vous pour commenter.

 Réponse acceptée

DGM
DGM le 9 Avr 2023

0 votes

The second argument to implay() is the framerate in FPS. It's a scalar. I have no idea why you're passing it a vector including negative values, but that won't work.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by