pydicom-codify - Man Page

pydicom-codify – Read a DICOM file and produce the pydicom (Python) code which can create that file

Synopsis

pydicom codify [-h] [-e EXCLUDE_SIZE] [-p] [-s SAVE_AS] filespec [outfile]

Options

Positional Arguments

filespec

File specification, in format [pydicom::]filename[::element]. If pydicom:: prefix is present, then use the pydicom test file with that name. If element is given, use only that data element within the file.

Examples: path/to/your_file.dcm, your_file.dcm::StudyDate, pydicom::rtplan.dcm::BeamSequence[0], yourplan.dcm::BeamSequence[0].BeamNumber

outfile

Filename to write Python code to; if not specified then code is written to stdout

Optional Arguments

-h,  --help

Show a help message and exit

-e EXCLUDE_SIZE, --exclude-size EXCLUDE_SIZE

Exclude binary data larger than specified (default: 100 bytes)

-p,  --include-private

Include private data elements (default is to exclude them)

-s SAVE_AS, --save-as SAVE_AS

Specify the filename for ds.save_as(save_filename); otherwise the input name + _from_codify will be used.

Notes

Binary data (e.g. pixels) larger than --exclude-size (default 100 bytes) is not included. A dummy line with a syntax error is produced. Private data elements are not included by default.

See Also

pydicom(1)

pydicom-help(1), pydicom-show(1)

Referenced By

pydicom(1), pydicom-help(1), pydicom-show(1).

September 2024