Why do I receive the error message "sliceViewer requires 3-D grayscale(MxNxP) or 3-D RGB volume(MxNxPx3) with no singleton dimensions"?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Siang Ching
el 1 de Mayo de 2023
Comentada: Matt J
el 2 de Mayo de 2023
I am using the following code to load a stacks of CT images for 3D multiplanar and volume viewing. All my images are of dicom format images without the .dcm extension.
I try to use the following code to open my images.
dataFolder = fullfile("folder_name");
sourceTable = dicomCollection(dataFolder);
medVol = medicalVolume(sourceTable);
My medVol function gives the following result:
medVol =
medicalVolume with properties:
Voxels: [512×512 uint16]
VolumeGeometry: [1×1 medicalref3d]
SpatialUnits: "mm"
Orientation: "transverse"
VoxelSpacing: [1 1 1]
NormalVector: [0 0 1]
NumCoronalSlices: 512
NumSagittalSlices: 512
NumTransverseSlices: 1
PlaneMapping: ["sagittal" "coronal" "transverse"]
Modality: "CT"
WindowCenters: 200
WindowWidths: 50
sliceViewer(medVol)
My sliceViewer returned the following error message:
"Error using images.stacks.browser.internal.SliceViewer/validateVolume
sliceViewer requires 3-D grayscale(MxNxP) or 3-D RGB volume(MxNxPx3) with no singleton dimensions.
Error in images.stacks.browser.internal.SliceViewer/loadData
Error in sliceViewer"
Why my dicom images does not contain 3D grayscale or 3D RGB volume?
I tried to search online for ways to convert such images to grayscale or RGB but to no avail. I only get search results on conversion of grayscale to RGB and vice versa. Is there any way to convert my dicom images to 3D grayscale or 3D RGB volume? Any help is very much appreciated. Thank you.
0 comentarios
Respuesta aceptada
Matt J
el 1 de Mayo de 2023
Editada: Matt J
el 1 de Mayo de 2023
I see nothing in your code that would be expected to access the numeric content of the DICOM files. You should probably be using dicomreadVolume to read in your data, perhaps
V = dicomreadVolume(sourceTable)
But even then, you should check what is being read in, and if it indeed has the form of a numeric volume array,
whos V
2 comentarios
Matt J
el 2 de Mayo de 2023
You're welcome, but if it ends up working, please Accept-click the answer.
Más respuestas (0)
Ver también
Categorías
Más información sobre Medical Physics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!