The size of the third dimension is 1 (we call that a singleton dimension) because the voxels do not have multiple color components. The easy way is to use the function dicomreadVolume, which uses the DICOM metadata to automatically figures out how to arrange the slices in the output volume. ![]() But it means that my assumption about the filenames was completely off.īut wait! As I said, I was doing this the hard way. Does that even make sense, I wondered? Are these all unique slice locations? Let me try sorting them, first, and then plotting them. Info = dicominfo(folder + "/" + d(k).name) folder = "/Users/eddins/OneDrive - MathWorks/General Reference/D/DICOM Head-Neck-PET-CT Dataset/HN-CHUM-001/08-27-1885-PANC. Let me read the files in filename order and plot the resulting slice locations. You can see this by looking at the SliceLocation field returned by dicominfo. I had assumed that the filename order corresponded to physical slice order, but I was wrong. So, I read these files in filename order and concatenated the data in the third dimension. You can see that I had files of the form 00000.dcm, 00001.dcm. I naively assumed that there was some meaning to the order of filenames in the DICOM dataset. I tried to do this the hard way at first, and of course I got it wrong. ![]() I had downloaded a Head-Neck CT+PET study, and I wanted to create a volume array in MATLAB. Earlier this year, I learned something about DICOM datasets that surprised me.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |