When I read the spacing from sitk image using image.GetSpacing() it is ok but the size (image.GetSize()) is different: 800 * 100 * 400
Do I need to reshape the NumPy array before importing it to the SITK and then just use the sitk.GetArrayFromImage to convert it to the NumPy array and have the same Spacing and Size?
I tried to inspect the image inSITK using FIJI but it didn’t show the spacing correctly (all are equal to one)
SimpleITK and numpy use a different indexing order. SimpleITK uses x-y-z. Numpy uses z-y-x. The GetImageFromArray method accounts for this. Thus when you inspect the image size afterwards the reported order is x-y-z which matches your original numpy size. With respect to SetSpacing, it should also follow the x-y-z order. For additional details see this jupyter notebook.
Fiji is not aware of variable image spacing, assumes isotropic pixels/voxels ([1,1,1]). Other programs that do account for image spacing can be used via the Show method (e.g. ITK-SNAP, 3D Slicer). See this jupyter notebook for details.