I’ve got a structured points file I made with Houndsfield values for each point and I would like to convert into into a DICOM file that can be read imported into Mimics or 3D Slicer. I found this GDCM Wiki which seems like it may work, and I have also considering using pydicom. Anyone have experience with this or advice on the easiest approach?
I think the simplest approach is to save your image in NIFTI format, and then convert the NIFTI file to DICOM with niftitodicom. If you are using ubuntu, you can get niftitodicom with
apt install vtk-dicom-tools, but if not, you can download the binaries here.
mkdir my_dicom_folder niftitodicom --modality CT -o my_dicom_folder/ image.nii.gz
There is also a vtkDICOMWriter for VTK, but to use it you have to build VTK from source and enable
VTK_MODULE_ENABLE_VTK_vtkDICOM in the configuration.
You can also use pydicom (I use pydicom a lot, myself), but with pydicom you are responsible for adding all the attributes to the file that make it a standards-compliant DICOM CT file. So I don’t recommend it unless you have read the relevant portions of the DICOM standard.