Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility dcm2str to apply Attributes Format Pattern to dicom file and/or command line parameters #385

Closed
gunterze opened this issue Dec 11, 2018 · 0 comments
Assignees
Milestone

Comments

@gunterze
Copy link
Member

gunterze commented Dec 11, 2018

usage: dcm2str -p <pattern> [-s <[seq/]attr=value>].. --
               [<file>..][<directory>..]

Apply Attributes Format Pattern either to one or more DICOM files and/or
DICOM file(s) in one or more directories. If individual attributes are
specified, the attributes of the DICOM file(s) shall be overwritten by the
specified attributes before the Attributes Format Pattern is applied.
-
Options:
 -h,--help               display this help and exit
 -p <pattern>            Specify Attributes Format Pattern to be applied.
 -s <[seq/]attr=value>   Specify attributes added to the object(s). It can
                         be specified by keyword or tag (in hex), e.g.
                         StudyInstanceUID=1.2.3 or 0020000D=1.2.3.
                         Attributes in nested Datasets can be specified by
                         including the keyword/tag value of the sequence
                         attribute, e.g. 00400275/00400009 for Scheduled
                         Procedure Step ID in the Request Attributes
                         Sequence.
 -V,--version            output version information and exit

Examples:
=> dcm2str -p '{0020000D,hash}/{0020000E,hash}/{00080018,hash}/{rnd}'
image.dcm
Apply Attributes Format Pattern to the specified DICOM file.

=> dcm2str -p '{0020000D,hash}/{0020000E,hash}/{00080018,hash}/{rnd}'
-sStudyInstanceUID=1.2.3 -sSeriesInstanceUID=1.2.3.4
-sSOPInstanceUID=1.2.3.4.5 -- image.dcm
Overwrite attributes of the specified DICOM file with specified DICOM
attributes and then apply Attributes Format Pattern to the specified DICOM
file.

=> dcm2str -p '{0020000D,hash}/{0020000E,hash}/{00080018,hash}/{rnd}'
-sStudyInstanceUID=1.2.3 -sSeriesInstanceUID=1.2.3.4
-sSOPInstanceUID=1.2.3.4.5 -- image.dcm
/path-to-other-DICOM-files-directory
Overwrite attributes of the specified DICOM file and of other DICOM files
in the directory with the specified DICOM attributes and only then apply
Attributes Format Pattern to DICOM file and to other DICOM files in the
directory.

=> dcm2str -p '{0020000D,hash}/{0020000E,hash}/{00080018,hash}/{rnd}'
image.dcm /path-to-other-DICOM-files-directory
Apply Attributes Format Pattern to the specified DICOM file and also to
the other DICOM files in the specified directory.

=> dcm2str -p '{0020000D,hash}/{0020000E,hash}/{00080018,hash}/{rnd}'
-sStudyInstanceUID=1.2.3 -sSeriesInstanceUID=1.2.3.4
-sSOPInstanceUID=1.2.3.4.5
Apply Attributes Format Pattern to DICOM attributes passed as command line
parameters.

Related #384

@gunterze gunterze added this to the 5.15.1 milestone Dec 11, 2018
vrindanayak added a commit that referenced this issue Jan 9, 2019
vrindanayak added a commit that referenced this issue Jan 10, 2019
patrick-peer pushed a commit to patrick-peer/dcm4che that referenced this issue Oct 17, 2019
patrick-peer pushed a commit to patrick-peer/dcm4che that referenced this issue Oct 17, 2019
patrick-peer pushed a commit to patrick-peer/dcm4che that referenced this issue Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants