Slice Interpolation

Operating system: Windows 7
Slicer version: 4.8.1
Expected behavior: 3D Slicer should show the exact number of slices as appear in a DICOM viewer
Actual behavior: 3D Slicer shows extra (and I cannot find a “match” for some of the correct slices shown in DICOM)

I am working with MRI data. When I load it into 3D Slicer, it often adds extra slices than what are actually present (i.e. one scan has 8 slices, which I verified with the PHILIPS DICOM viewer, but in 3D slicer, the data shows up as having 13 slices). Now, sliding the slider at the top of each frame definitely interpolates between slices, but I am wondering if interpolation also occurs when I am using the arrow keys, which usually just navigates slice by slice. The reason I am wondering this is that I tried to match the slices I was seeing in the DICOM viewer with what I was seeing in 3D slicer, to filter out the extra, non-matching slices in Slicer, but some of the slices from the DICOM viewer are not precisely matched anywhere in what 3D slicer showed me. This error is present whether I load in the data in DICOM or NIFTY (.nii) form.

Any insights are much appreciated! Thank you.

3D Slicer reconstructs 3D volumes from the input 2D image slices and no reference is kept to 2D slice indexes. However, you may find that one of the voxel indexes that slicer displays in the Data Probe section in the lower-left corner correlate with DICOM slice index (most likely there will be an offset of 1, since DICOM usually start the numbering at 1 instead of 0).

image

Sorry, I don’t think I was clear enough in my previous post. When I import the DICOM data itself into 3D Slicer, the some problem arises as with the NIFTY data. I am comparing the 2D slices as shown in 3D slicer to the 2D slices as shown in a different DICOM viewer software. How does 3D Slicer decide which slices to show? Are they an exact match to the “real” slices, or no?

Slicer displays patient spact by default. Your images might have been acquired on a tilted plane, in which case you could see the discussion here (look for “Rotate to volume plane”)

1 Like

You always see the real image. The coordinates (both the anatomical/patient coordinates and voxel coordinates) are also all real and correct. You may turn off interpolation (Volumes module / Display / Interpolate checkbox) if you want to make sure that at a certain position in the image you see the contribution of exactly one pixel of the image slices.

If you could tell what your application (anatomy, procedure, imaging modality, etc) and your concerns are then we could give more specific answer.

1 Like

If I understand correctly, I think the request is for the spacing mode vtkMRMLSliceNode::PrescribedSliceSpacingMode (“manual spacing”) to automatically match the volume spacing along the corresponding axis.

Thank you, rotating to the volume axis really helped. The application is research (calculating the volume of stroke lesions). Would having interpolate on or off have a big difference on the accuracy in this case (I doubt it would…)?

Interpolation has no effect on anything but how smooth the image appears (if you see boundary of individual voxels or the transition is continuous).

Slice step size is already the same as the volume spacing along the corresponding axis, but this step size is not used when you browse slices using the slider above the viewer (only when mouse wheel or arrow keys are used).

1 Like

HI Lassoan,
Thank you for the information. We are looking for the algorithm that this interpolation checkbox triggered. Is it linear or B-spline based interpolation? Is there code that we can refer to for this interpolation function?

It looks like the interpolation dramatically increase the spatial resolution and smooth the image with very smooth boundaries.

Thank you very much!
Yong

It is linear interpolation, implemented in vtkImageReslice filter.

Note that this interpolation does not increate resolution, it just displays the continuous signal reconstructed from samples (instead of showing discrete samples).

Thank you very much!

How can we know the values of the reconstructed continuous signals?

Yong

You can reconstruct a continuous signal from discrete samples. For typical medical images, linear interpolation results are usually indiscernible from the optimal reconstruction results.