处理dicom数据的chris树并按年龄重新排序。

pfdicom-agesort的Python项目详细描述


https://badge.fury.io/py/pfdicom_agesort.svghttps://travis-ci.org/FNNDSC/pfdicom_agesort.svg?branch=masterhttps://img.shields.io/badge/python-3.5%2B-blue.svg

Quick Overview

  • pfdicom_agesort处理符合chris的pacs拉树和重新排序
    根据明确的<;年>;/<;月>;/<;示例>;结构显示的内容。

Overview

pfdicom_agesort将mri/dicom数据的chris默认树重新打包到显式反映年龄的组织。程序在文件树空间上执行mulit pass循环,如下面的[–stage<;stage>;]标志中定义的。

注意:

  • pfdicom_agesortpfdicom_tagExtract中删除。有关更多信息,请参阅pfdicom_tagExtract的文档。

Installation

Dependencies

以下依赖项安装在主机系统/python3 virtual env上(如果从pypi中提取,它们也将自动安装):

  • pfmisc(pf*对象系列的各种杂项模块和类)
  • pftree(创建文件系统层次结构的字典表示)
  • pfdicom(处理底层dicom文件读取)

Using ^{tt1}$

安装此脚本及其所有依赖项的最佳方法是 从pypi获取它

pip3 install pfdicom_agesort

Command line arguments

-I|--inputDir <inputDir>
Input DICOM directory to examine. By default, the first file in this
directory is examined for its tag information. There is an implicit
assumption that each <inputDir> contains a single DICOM series.

[-e|--extension <DICOMextension>]
An optional extension to filter the DICOM files of interest from the
<inputDir>.

-O|--outputDir <outputDir>
The output root directory that will contain a tree structure identical
to the input directory, and each "leaf" node will contain the analysis
results.

In the case of `pfdicom_agesort`, this <outputDir> is the root of the
age sorted tree.

[--outputLeafDir <outputLeafDirFormat>]
If specified, will apply the <outputLeafDirFormat> to the output
directories containing data. This is useful to blanket describe
final output directories with some descriptive text, such as
'anon' or 'preview'.

This is a formatting spec, so

    --outputLeafDir 'preview-%s'

where %s is the original leaf directory node, will prefix each
final directory containing output with the text 'preview-' which
can be useful in describing some features of the output set.

[-F|--tagFile <tagFile>]
Read the tags, one-per-line in <tagFile>, and print the
corresponding tag information in the DICOM <inputFile>.

[-T|--tagList <tagList>]
Read the list of comma-separated tags in <tagList>, and print the
corresponding tag information parsed from the DICOM <inputFile>.

[-S|--symlinkDCMdata]
If true/specified, perform a symlink of the original DICOM data to
the final output directory tree. If false, a copy of the original
DICOM data is performed.

[-D|--doNotCleanUp]
If true, do not cleanup the original tag data tree created when
analysing the original DICOM tree structure.

[-m|--image <[<index>:]imageFile>]
If specified, also convert the <inputFile> to <imageFile>. If the
name is preceded by an index and colon, then convert this indexed
file in the particular <inputDir>.

[-s|--imageScale <factor>[:<interpolation>]]
If an image conversion is specified, this flag will scale the image
by <factor> and use an interpolation <order>. This is useful in
increasing the size of images for the html output.

Note that certain interpolation choices can result in a significant
slowdown!

    interpolation order:

    'none', 'nearest', 'bilinear', 'bicubic', 'spline16',
    'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',
    'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos'

-o|--outputFileStem <outputFileStem>
The output file stem to store data. This should *not* have a file
extension, or rather, any "." in the name are considered part of
the stem and are *not* considered extensions.

[-t|--outputFileType <outputFileType>]
A comma specified list of output types. These can be:

    o <type><ext><desc>
    o raw       -raw.txt    the raw internal dcm structure to string
    o json      .json       a json representation
    o html      .html       an html representation with optional image
    o dict      -dict.txt   a python dictionary
    o col       -col.txt    a two-column text representation (tab sep)
    o csv       .csv        a csv representation

Note that if not specified, a default type of 'raw' is assigned.

[--stage <stage>]
Stage to execute -- mostly for debugging purposes and useful if running a
particular stage repeatedly.

[--infoJSON <infoJSONfile>]
The name of the study JSON file.

Defaults to 'info.json'.

[--threads <numThreads>]
If specified, break the innermost analysis loop into <numThreads>
threads.

[-x|--man]
Show full help.

[-y|--synopsis]
Show brief help.

[--json]
If specified, output a JSON dump of final return.

[--followLinks]
If specified, follow symbolic links.

[-v|--verbosity <level>]
Set the app verbosity level.

    0: No internal output;
    1: Run start / stop output notification;
    2: As with level '1' but with simpleProgress bar in 'pftree';
    3: As with level '2' but with list of input dirs/files in 'pftree';
    5: As with level '3' but with explicit file logging for
            - read
            - analyze
            - write

Examples

处理包含dicom的chris树:

pfdicom_agesort                                             \\
            -I /neuro/users/chris/data/mrn                  \\
            -O /neuro/users/chris/data/age                  \\
            --threads 0 --printElapsedTime                  \\
            -e dcm                                          \\
            -o '%_md5|6_PatientID-%PatientAge'\\
            -m 'm:%_nospc|-_ProtocolName.jpg'\\
            -s 3:none                                       \\
            --useIndexhtml                                  \\
            -t raw,json,html,dict,col,csv                   \\
            --followLinks                                   \\
            --symlinkDCMdata                                \\
            -v 3\\
            --threads 0

它将重新组织文件树,如图所示,打印最终经过的处理时间。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用增强的forloop从两个ArrayList检索数据   如何在安卓 java中设置双精度3范围零   java PostgreSQL+Openshift:对于给定的数据库URL,可能是错误的驱动程序?   使用war时IBM Liberty(WLP)中的java组到角色映射   java Android league应用程序不断崩溃   Java错误仅允许对参数进行非法修改   为什么“enum”的实例字段在java中是“enum”?   java无法引用TextView   java SimpleJdbcInsert未在默认模式的表中插入数据   多线程Java多线程共享一个全局映射变量   java如何从WebView获取HTML内容进行打印?   JavaLibGDX:如何更改单个精灵的颜色?   测试Java程序退出函数不工作   欺骗HWID欺骗程序Java