0

面罩位置错误 在我将 MRI DICOM 图像转换为 NIfTI 格式后,面具不在正确的位置。在文件格式转换之前,掩码在正确的位置(sella 区域)。掩码一开始是 mha 格式,然后转换为 NIfTI 文件。但是,即使将掩码转换为 NIfTI 格式,它仍然在错误的位置。

`def transform(input_names, out_path, name):
    converter = Dcm2niix()
    converter.inputs.source_names = input_names
    # converter.inputs.compression = 5

    converter.inputs.out_filename = name
    converter.inputs.output_dir = out_path
    # converter.inputs.merge_imgs = True
    cmd=converter.cmdline
    os.system(cmd)`
img_mask=sitk.ReadImage(mask_file)
    sitk.WriteImage(img_mask,outpath+pt_name+'_mask.nii.gz')
4

0 回答 0