我正在 powerwshell 中工作,我想知道是否有一种方法可以转储属于一个组的所有标签。例如,如果我知道 (0029,0010) 处有一个 Private Creator 标签,那么工具包中是否有某些内容可以转储 (0029,10xx) 处的所有标签
希望是这样的
gci -Path "path_to_dcm_file" | %{dcmdump (0029,10**) $_.FullName}
最佳答案
查看 dcmdump 的帮助,您找到的选项似乎是 +P
Get-ChildItem -Path "path_to_dcm_file" |
ForEach-Object {dcmdump.exe +P 0029,0010 $_.FullName}
但是对于 10xx 部分,我无法找到在标签搜索中使用通配符的方法。您可以使用 powershell 来打印所有标签,然后使用 powershell 进行过滤。
Get-ChildItem -Path "path_to_dcm_file" |
ForEach-Object {dcmdump.exe $_.FullName | Select-String '0029,10??'}
或者如果您想匹配的不仅仅是最后 2 个数字
Get-ChildItem -Path "path_to_dcm_file" |
ForEach-Object {dcmdump.exe $_.FullName | Select-String '0029,\d{4}'}
关于powershell - 在Powershell中,有一种便捷的方法来转储属于组的所有dicom元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64320975/