Assignment has more non-singleton rhs dimensions than non-singleton subscripts

I get this error line (see subject) at the code line:
ct(:,:,i)=double(dicomread([folder , '/', files(strcmp(temp(i),inst)==1).name]));
Any help?

 Respuesta aceptada

Walter Roberson
Walter Roberson el 7 de Mayo de 2018
Editada: Walter Roberson el 7 de Mayo de 2018
dicomread() can return a 3 or even 4 dimensional array for some kinds of data. Your code assumes that it is returning a 2 dimensional array.
Your code uses the variable "ct", which hints that you might be reading CT datasets. CT datasets are often multiple slice, 3 dimensional.

3 comentarios

You are correct. This DICOM Viewer I use it works fine for CT dicom images but not for ultrasound. I try to load 30 ultrasound images and cannot recognize them as a series. Instead, it only sees them as separate images but not as a group. I need to make it sees them as a group
If you do
temp = dicomread([folder , '/', files(strcmp(temp(i),inst)==1).name]);
then what is size(temp) and class(temp) ?
Sorry. I changed code. Didn't keep this and lost it

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre DICOM Format en Centro de ayuda y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by