ct-volume-preprocessing
ct-volume-preprocessing copied to clipboard
Poor segmentation results with TotalSegmentator.
import os import SimpleITK as sitk import numpy as np
data = np.load("ct/trn00022.npz") ct_data = data["ct"]
ct = sitk.GetImageFromArray(ct_data) ct = sitk.Cast(ct, sitk.sitkInt16)
ct.SetSpacing((0.8, 0.8, 0.8))
orientation = [1, 0, 0, 0, 1, 0] row_cosine, col_cosine = orientation[:3], orientation[3:6] z_cosine = np.cross(row_cosine, col_cosine).tolist() ct.SetDirection(row_cosine + col_cosine + z_cosine)
sitk.WriteImage(ct, "radchest_debug.nii.gz")
I use the above code to convert the data format from npz to nii.gz. Then, I use TotalSegmentator to predict the masks of prepared nii.gz images. However, I find the segmentation results are poor. How can I solve it? Thanks!