2023年11月29日发(作者:)

()与imageJ结合使⽤常见的问题

python中配置simpleITK时,遇到了以下这个问题。

simpleITK已经通过pip install安装,但是()功能⽆法正常使⽤,类似如下

实例代码

import SimpleITK as sitk

import sys

import os

example = age("filename")

(example)

()这⼀步会出现以下错误

“Traceback (most recent call last):

File "", line 1, in

(image)

File "C:", line 4158, in Show

return _(*args, **kwargs)

RuntimeError: Exception thrown in SimpleITK Show: ............BuildITKSimpleITK-

:463:

sitk::ERROR: Error in administrating child process: [参数错误。]”

原因是SimpleITK的图像显⽰功能是通过类似ITK-snapImageJ进⾏实现的,所以在进⾏()之前,需要对此进⾏设置

才能正常实现。

ImageJ Installation

Make sure to download the bundled with 64-bit Java 1.8.0_112 version

ImageJ Setup

Download nifti_

Go to C:blahblahImageJpluginsInput-Output

Delete the existing nifti_ file from the folder

Copy the downloaded nifti_ file into the folder

Restart ImageJ and check if File -> Import -> NIfTI-Analyze is there

If it is there, the plugin was successfully installed

SimpleITK Setup

Find the path where your file exists

Open cmd

Type in setx SITK_SHOW_COMMAND "C:"

到此这篇关于python ()imageJ结合使⽤常见的问题的⽂章就介绍到这了,更多相关()结合imageJ内容请搜

索以前的⽂章或继续浏览下⾯的相关⽂章希望⼤家以后多多⽀持!