Domanda

We're reviewing NIFTI images in the 2D viewer. The CDN version of XTK displays them upside down, so I checked out the code from Github. The master branch on Github shows the images in the correct orientation, but demonstrates a strange banding or striping artifact. Poking around commits, I found that commit 332b822... Fix compilation for the changes in parserFSM and parserTRK. works correctly, i.e. correct orientation, no banding, but the HEAD of master does not.

Unfortunately, I don't understand XTK quite enough to fix the problem.

Any ideas?

Image with stripe artifact from HEAD of master Stripe artifact

Second broken image

Stripe artifact

Correct image from 332b822

No artifact

È stato utile?

Soluzione

This happens because we do not do any interpolation during the reslicing.

Here is what is going on, on the XTK side:

Before:

  1. Parse NII (pixels)
  2. Create a 3D array containing all the pixels
  3. Display ii

-> orientation is messed up because we do not take it into account. We only slice 3D array through X, Y and Z axis.

Now:

  1. Parse NII (pixels and orientation)
  2. Create a 3D array containing all the pixels
  3. Rotate 3D array
  4. Extract pure Sagittal, Coronal and Axial slices from the rotated array containing the data

-> orientation is correct up because we do take it into account. But the slice we extract might present some artifacts because when we generate the slices, we do not do any interpolation.

We want to add the interpolation soon.

A good place to start is at line 861: https://github.com/xtk/X/blob/master/io/parser.js

It might be tricky though...

We also what to add the ability to switch between "oriented volume" and "acquired volume" easily.

I think that will be faster to implement and a good trade-off for now.

Thanks

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top