open-discussion > RE: nii to dicom conversion
Nov 28, 2016  06:11 AM | Tayyab Ateeq - UET Taxila
RE: nii to dicom conversion
Originally posted by Allen Waggoner:
Originally posted by Tayyab Ateeq:
Thanks Allen. I installed Mango and tried to do just like you said but it saved only one slice. I want to save as many slices as possible. Is it possible in Mango?
Thanks

I see, I don't think this is an issue with Mango, I think it is an issue with the structure of your data.  As far as I know, the dicom format only supports spatial dimensions. So if your data has more dimensions, like time, the the data is stored in multiple files.  The nifti header supports up to 7 dimensions, but the first 3 are reserved for spatial dimensions and the fourth is for time.  If you open your nifti file in Mango and select Image Info from the File menu, you will get a popup window.  At the top of this popup window will be two buttons, Summary and Header.  If you click on Header, you will see the full nifti header.  On the line labeled Image Dimensions you might see something like this

Image Dimensions (1-8): 4, 256, 256, 1, 10, 1, 1, 1

The first element is the actual number of dimensions used (4), so this means that each of your images is 256x256, you have one slice and 10 repetitions in time.  If you convert this file to dicom you will get 10 dicom files, each containing one slice.  In the bottom right hand corner of the popup window is a button labeled edit.  If you click on this edit button, a new window will open that will let you edit the elements of the header.  If you change the Image Dimension line to this

Image Dimensions (1-8): 3, 256, 256, 10, 1, 1, 1, 1

when you convert this modified file to dicom, you should get only one file.  In this dicom file the apparent slice dimension will actually be your time dimension.  A bit of a warning though, if you have a large number of time points (now slices), some dicom viewers, might behave strangely.

Allen

I opened file info. There is no label such as Image dimension in header section. In summary there is one. 
Image Dimensions (X, Y, Z): 512 x 512 x 150
Regards

Threaded View

TitleAuthorDate
Tayyab Ateeq Nov 25, 2016
Allen Waggoner Nov 25, 2016
Tayyab Ateeq Nov 25, 2016
Allen Waggoner Nov 28, 2016
RE: nii to dicom conversion
Tayyab Ateeq Nov 28, 2016
Allen Waggoner Nov 28, 2016
Tayyab Ateeq Nov 28, 2016
Allen Waggoner Nov 29, 2016
Tayyab Ateeq Nov 29, 2016
Allen Waggoner Nov 29, 2016
Tayyab Ateeq Dec 6, 2016