How does one set the PatientPosition and other spatial attributes when writing a dicom CT volume?
I am trying to write DICOMs of a CT volume in both single- and multi-file form. To check that the result is readable, I try reading the file(s) back in with dicomreadVolume(). Below is one such attempt.
info.StudyDescription = ‘Description’;
info.SOPClassUID = ‘1.2.840.10008.5.1.4.1.1.2’;
info.PixelSpacing = [1,1]; % x & y voxel size
info.SliceThickness =1; % optional
info.SpacingBetweenSlices = 1;
info.ImageOrientationPatient = [1,0,0,0,-1,0];
info.PatientPosition=’HFS’;
status=dicomwrite(ones(250,250,1,250),’out.DCM’, info,’CreateMode’,’copy’,’ObjectType’,…
‘CT Image Storage’,’MultiframeSingleFile’,1);
info=dicominfo(‘out.DCM’);
Clearly, the write operation produced a DICOM file containing a PatientPosition attribute because,
info.PatientPosition
Why then, does dicomreadVolume complain?
V=dicomreadVolume(‘out.DCM’);I am trying to write DICOMs of a CT volume in both single- and multi-file form. To check that the result is readable, I try reading the file(s) back in with dicomreadVolume(). Below is one such attempt.
info.StudyDescription = ‘Description’;
info.SOPClassUID = ‘1.2.840.10008.5.1.4.1.1.2’;
info.PixelSpacing = [1,1]; % x & y voxel size
info.SliceThickness =1; % optional
info.SpacingBetweenSlices = 1;
info.ImageOrientationPatient = [1,0,0,0,-1,0];
info.PatientPosition=’HFS’;
status=dicomwrite(ones(250,250,1,250),’out.DCM’, info,’CreateMode’,’copy’,’ObjectType’,…
‘CT Image Storage’,’MultiframeSingleFile’,1);
info=dicominfo(‘out.DCM’);
Clearly, the write operation produced a DICOM file containing a PatientPosition attribute because,
info.PatientPosition
Why then, does dicomreadVolume complain?
V=dicomreadVolume(‘out.DCM’); I am trying to write DICOMs of a CT volume in both single- and multi-file form. To check that the result is readable, I try reading the file(s) back in with dicomreadVolume(). Below is one such attempt.
info.StudyDescription = ‘Description’;
info.SOPClassUID = ‘1.2.840.10008.5.1.4.1.1.2’;
info.PixelSpacing = [1,1]; % x & y voxel size
info.SliceThickness =1; % optional
info.SpacingBetweenSlices = 1;
info.ImageOrientationPatient = [1,0,0,0,-1,0];
info.PatientPosition=’HFS’;
status=dicomwrite(ones(250,250,1,250),’out.DCM’, info,’CreateMode’,’copy’,’ObjectType’,…
‘CT Image Storage’,’MultiframeSingleFile’,1);
info=dicominfo(‘out.DCM’);
Clearly, the write operation produced a DICOM file containing a PatientPosition attribute because,
info.PatientPosition
Why then, does dicomreadVolume complain?
V=dicomreadVolume(‘out.DCM’); dicomread, dicomwrite, dicominfo, ct, multiframesinglefile MATLAB Answers — New Questions