displaying imagedata and polydata in same reander

Hello,I want displaying imagedata and polydata in the same reander,use vtkjs.
The effect is like this, in 3DSlicer

but when load imagedata and polydata.I find the position of imagedata is not right.
the imagedata and polydata not in same position,
what should i do?
thank you a lot

1 Like

You may need to print the origin/spacing/direction of your vtkImageData to confirm that the position of vtkImageData & vtkPolyData is the same.

origin is same,[0,0,0]
vtkPolyData no spacing
vtkImageData direction is [1,0,0,0,1,0,0,0,1]

Older versions of Slicer use RAS orientation, which is different from LPS usually used by medical images. I think that current nightlies use LPS by default. You might need to have RAS to LPS transform applied to your mesh before exporting it from Slicer.

I find the problem.
I use vedo(python lib,really powerful) to convert slicerimage data from nii.gz to vti
and use 3DSlicer convert polydata from nii.gz to obj.
so the mistake happened,
I only use vedo get vti and obj file,the problem is solved.


1 Like