Please see this link for more information about the GUI. I tried to put everything together in one GUI to facilitate the work for you and you can do the conversion for one single file or a directory with a single click. You may face problems with the method provided above, for this reason I found anouther way to do the conversion correctly using SimpleITK example that conversion an array into dicom series. OsiriX is an image processing software dedicated to DICOM images ('.dcm' / '.DCM' extension) produced. PhotometricInterpretation = "MONOCHROME2" dicom_file. dcmread( 'images/dcmimage.dcm')ĭicom_file. `file_dir`: parameter will take the path to save the slices `index`: parameter will represent the index of the slice, so this parameter will be used to put the name of each slice while using a for loop to convert all the slices """ dicom_file = pydicom. """ `arr`: parameter will take a numpy array that represents only one slice. This is the main function that does all the work:ĭef convertNsave( arr, file_dir, index = 0): Tqdm: pip install tqdm (this one is just to print the progress of the conversion) Convert multiple nifti files into multiple dicom series.Īs with any other program, we need some packages to complete this conversion, so in this project, you will need to install the following packages individually.Convert one nifti file into dicom series.Extract the frame data from the nifti file.OsiriX is not limited to medical viewer formats such as CT or MR, it can also view images saved as jpg, tiff, mov, NIfTI, and much more. OsiriX HD is capable of displaying images from all imaging modalities (ultrasound, CT scanner, MRI, PET, etc. (But then it would be even simpler to go back and use the original DICOM file. Then this DICOM file could be processed as usual. It is an easy to use application, and easy to learn how to use as well. A simpler solution would be to implement a tool that can reconstruct a standard binary DICOM file from a nrrd/nifti+json. All of the details can be found on my blog, which I dedicated to this function. OsiriX is an open source DICOM viewing software developed for Mac computers. You can simply clone this repository and begin using it. I needed this conversion during my internship while working on tumor segmentation, so I wanted to share the method I discovered with you. OsiriX: an open-source software for navigating in multidimensional DICOM images Authors Antoine Rosset 1, Luca Spadola, Osman Ratib Affiliation 1 Department of Radiology, David Geffen School of Medicine, University of California Los Angeles, Los Angeles, California 90095-1721, USA. This repository contains the complete code for converting nifti files to dicom series.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |