对于目录中的每个文件,将其作为参数传递给图像查看器

对于目录中的每个文件,将其作为参数传递给图像查看器

我有一个包含一堆.dcm文件(它们是医学扫描文件)的目录,如下所示:

J6071c1.dcm  J6071d7.dcm  J6071ed.dcm  J607203.dcm  J607219.dcm  J60722f.dcm
J6071c2.dcm  J6071d8.dcm  J6071ee.dcm  J607204.dcm  J60721a.dcm  J607230.dcm
J6071c3.dcm  J6071d9.dcm  J6071ef.dcm  J607205.dcm  J60721b.dcm  J607231.dcm
J6071c4.dcm  J6071da.dcm  J6071f0.dcm  J607206.dcm  J60721c.dcm  J607232.dcm
J6071c5.dcm  J6071db.dcm  J6071f1.dcm  J607207.dcm  J60721d.dcm  J607233.dcm
J6071c6.dcm  J6071dc.dcm  J6071f2.dcm  J607208.dcm  J60721e.dcm  J607234.dcm
J6071c7.dcm  J6071dd.dcm  J6071f3.dcm  J607209.dcm  J60721f.dcm  J607235.dcm
J6071c8.dcm  J6071de.dcm  J6071f4.dcm  J60720a.dcm  J607220.dcm  J607236.dcm
J6071c9.dcm  J6071df.dcm  J6071f5.dcm  J60720b.dcm  J607221.dcm  J607237.dcm
J6071ca.dcm  J6071e0.dcm  J6071f6.dcm  J60720c.dcm  J607222.dcm  J607238.dcm
J6071cb.dcm  J6071e1.dcm  J6071f7.dcm  J60720d.dcm  J607223.dcm  J607239.dcm
J6071cc.dcm  J6071e2.dcm  J6071f8.dcm  J60720e.dcm  J607224.dcm  J60723a.dcm
J6071cd.dcm  J6071e3.dcm  J6071f9.dcm  J60720f.dcm  J607225.dcm  J60723b.dcm
J6071ce.dcm  J6071e4.dcm  J6071fa.dcm  J607210.dcm  J607226.dcm  J60723c.dcm
J6071cf.dcm  J6071e5.dcm  J6071fb.dcm  J607211.dcm  J607227.dcm  J60723d.dcm
J6071d0.dcm  J6071e6.dcm  J6071fc.dcm  J607212.dcm  J607228.dcm  J60723e.dcm
J6071d1.dcm  J6071e7.dcm  J6071fd.dcm  J607213.dcm  J607229.dcm  J60723f.dcm
J6071d2.dcm  J6071e8.dcm  J6071fe.dcm  J607214.dcm  J60722a.dcm  J607240.dcm
J6071d3.dcm  J6071e9.dcm  J6071ff.dcm  J607215.dcm  J60722b.dcm  J607241.dcm
J6071d4.dcm  J6071ea.dcm  J607200.dcm  J607216.dcm  J60722c.dcm  J607242.dcm
J6071d5.dcm  J6071eb.dcm  J607201.dcm  J607217.dcm  J60722d.dcm
J6071d6.dcm  J6071ec.dcm  J607202.dcm  J607218.dcm  J60722e.dcm

我跟着此信息并安装dicomscope以便查看图像。

输入后dicomscope J6071c1.dcm会打开该特定图像。

在 GUIdicomscope本身中,似乎没有办法打开多个文件并查看它们(有点像幻灯片一样)。

我想输入类似的内容dicomscope *.dcm来打开目录中的每个文件,但它不起作用。

同样,ls | dicomscope不起作用。

在这两种情况下,dicomscope都会启动但图像查看器中仅显示黑屏。

有哪位好心的 bash/zsh 专家能帮帮我吗?谢谢。

答案1

依次打开:(
要停止,请切换到终端并按Ctrl+c

for f in *.dcm; do dicomscope "$f"; done

全部打开(仅在dicomscope允许同时运行的情况下才有效):(
可以先尝试使用较少的文件)

for f in *.dcm; do dicomscope "$f" & done

答案2

你尝试过 aeskulap (http://aeskulap.nongnu.org/)而不是 dcomscope?使用以下方法安装

sudo apt install aeskulap

然后像这样运行它

aeskulap *.dcm

它会让您滚动浏览图像。

相关内容