simple_pipeline.py
来自「DTMK软件开发包,此为开源软件,是一款很好的医学图像开发资源.」· Python 代码 · 共 21 行
PY
21 行
#!/usr/bin/env python
import itk, sys
itk.auto_progress(2)
# first argument is the pixel type
PType = getattr(itk, sys.argv[1])
# second arguement the image dimension
dim = int(sys.argv[2])
# get the image type
IType = itk.Image[PType, dim]
# create the reader
reader = itk.ImageFileReader[IType].New(FileName=sys.argv[3])
# and the writer
writer = itk.ImageFileWriter[IType].New(reader, FileName=sys.argv[4])
# execute the filters in the pipeline !
writer.Update()
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?