Hi fellows,
Before showing the link, I have already read the documentation for dicomwrite. It turns out that it works in the instance of an input image already being a dicom image.
I want to create a dicom file using an image that is an object in matlab environment.
I understand that the metadata structure go nuts, because there is no info in the structure (as the input is not derived from a dicom file).
When I try to create the dicom image, I get the following message:
Error using dicom_prep_ImagePixel>getPhotometricInterp (line 134)Cannot determine photometric interpretation.Error in dicom_prep_ImagePixel (line 9)metadata.(dicom_name_lookup('0028', '0004', dictionary)) =getPhotometricInterp(metadata, X, map, txfr, dictionary);Error in dicom_prep_metadata (line 51) metadata = dicom_prep_ImagePixel(metadata, X, map, txfr, useMetadataBitDepths, dictionary);Error in dicom_create_IOD (line 26)metadata = dicom_prep_metadata(IOD_UID, metadata, X, map, options.txfr,options.usemetadatabitdepths, dictionary);Error in dicomwrite>write_message (line 276) [attrs, status] = dicom_create_IOD(SOP_UID, X, map, ...Error in dicomwrite (line 212) [status, options] = write_message(X, filename, map, metadata, options);
How can I surpass this issue?
Thanks in advance
Best Answer