Skip to content

deid CLI tool never saves dicom output #275

@WillForan

Description

@WillForan

I've maybe misunderstood the intended workflow of died's main. I expected to run

deid --debug --outfolder /tmp/phi-clean/ --format dicom --overwrite identifiers --action all --deid ./deid-py.cfg --input phi/

and see new dicoms in /tmp/phi-clean. But the folder is left empty.

When put is requested for action identifiers, replace_identifiers is called but the default save is never changed, left as the default False. While the script ending output message is "files at {output_folder}", that folder will never get new dicoms(?)

https://github.com/pydicom/deid/blob/master/deid/main/identifiers.py#L66

    cleaned_files = replace_identifiers(
            dicom_files=dicom_files,
            ids=ids,
            deid=args.deid,
            overwrite=args.overwrite,
            output_folder=output_folder,
        )

https://github.com/pydicom/deid/blob/master/deid/dicom/header.py#L91

def replace_identifiers(
    dicom_files,
    ids=None,
    deid=None,
    save=False,
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions