1

I have a large dicom mri dataset for several patients. For each patient, there is a folder including many 2d slices of .dcm files and the data of each patient has different sizes. For example:

patient1: PixelSpacing=0.8mm,0.8mm, SliceThickness=2mm, SpacingBetweenSlices=1mm, 400x400 pixels

patient2: PixelSpacing=0.625mm,0.625mm, SliceThickness=2.4mm, SpacingBetweenSlices=1mm, 512x512 pixels

So my question is how can I convert all of them into {Pixel Spacing} = 1mm,1mm and {Slice Thickness = 1mm}?

Thanks.

montagnard
  • 21
  • 1
  • 5

1 Answers1

2

These are two different questions:

  1. About harmonizing positions and pixel spacing, these links will be helpful:

Finding the coordinates (mm) of identical slice locations for two MR datasets acquired in the same scanning session

Interpolation between two images with different pixelsize

http://nipy.org/nibabel/dicom/dicom_orientation.html

Basically, you want to build your target volume and interpolate each of its pixels from the nearest neighbors in the source volumes.

  1. About modifying the slice thickness: If you really want to modify the slice thickness rather than the slice distance, I do not see any chance to do this correctly with the source data you have. This is because the thickness says which width of the raw data was used to calculate the values for a slice in your stack (e.g. by averaging or calculating an integral). With a slice thickness of 2 or 2.4mm in the source volumes, you will not be able to reconstruct the gray values with a thickness of 1 mm. If your question was referring to slice distance rather than slice thickness, answer 1 applies.
Markus Sabin
  • 3,916
  • 14
  • 32
  • Thank you for answer. As my research, "resampling" is recommendend for this work. So I have to build a 3D data from 2D slices (eg. consider I have 150 slices and it will be a 400x400x150 matrix with a 0.8x0.8x2 spacing), then I will resample the data as 300 slices with 320x320 pixels with 1x1x1 spacing. – montagnard Nov 22 '17 at 08:49
  • I guess you are referring to my comment on Slice Thickness and that I think it is impossible. If you think of ST as a width (2mm) in the body, and a continuous singal has been averaged along this width, it is obvious that you will not be able to reconstruct 2 different slices with a width of 1mm correctly. The information you would need to do this has been "averaged out" in the source pixels you have. – Markus Sabin Nov 22 '17 at 09:57